HTTP500 - prevents crash when response is an array (#51)
* HTTP500 - prevents crash when response is an array * bumped version
This commit is contained in:
parent
a812496e41
commit
b69477bc29
|
@ -16,7 +16,7 @@ class serendipity_event_challengeresponse extends serendipity_event {
|
|||
'smarty' => '2.6.7',
|
||||
'php' => '4.1.0'
|
||||
));
|
||||
$propbag->add('version', '0.10');
|
||||
$propbag->add('version', '0.11');
|
||||
$propbag->add('event_hooks', array(
|
||||
'frontend_saveComment' => true,
|
||||
'frontend_comment' => true
|
||||
|
@ -73,7 +73,9 @@ class serendipity_event_challengeresponse extends serendipity_event {
|
|||
switch($event) {
|
||||
case 'frontend_saveComment':
|
||||
if (!is_array($eventData) || serendipity_db_bool($eventData['allow_comments'])) {
|
||||
if (strtolower($_POST['response']) != strtolower($this->get_config('response'))) {
|
||||
if (is_string($_POST['response']) && strtolower($_POST['response']) === strtolower($this->get_config('response'))) {
|
||||
return true;
|
||||
}else{
|
||||
$eventData = array('allow_comments' => false);
|
||||
$serendipity['messagestack']['comments'][] = $this->get_config('error');
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue