Skip to content

Instantly share code, notes, and snippets.

@marcmartino
Created July 6, 2012 00:05
Show Gist options
  • Save marcmartino/3057241 to your computer and use it in GitHub Desktop.
Save marcmartino/3057241 to your computer and use it in GitHub Desktop.
scope issues. $replyValue on line 4 is null, when it should be a 1 or a 0
public function markMessagesRead($mysqli, $replyValue){
$allMessages = $this->getAllMessages($mysqli);
$replyCheck = function ($message){
return $message.getAttribute($mysqli, "reply", "Reply") == $replyValue;
};
foreach(array_filter($allMessages, $replyCheck) as $messageItem){
$messageItem->setFirstViewDate($mysqli);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment