Skip to content
Browse files

Fix PHP warnings in parsers/ISBN/__parser.php

PHP Warning:  array_unshift() expects parameter 1 to be array, integer given in cite-gen/parsers/ISBN/__parser.php on line 57
PHP Warning:  in_array() expects parameter 2 to be array, null given in cite-gen/parsers/ISBN/__parser.php on line 59
  • Loading branch information...
1 parent 95d0fe5 commit 3aee1944bf7b9cf347400a903f97b3a57e10058f @saper saper committed Mar 26, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 parsers/ISBN/__parser.php
View
10 parsers/ISBN/__parser.php
@@ -54,10 +54,14 @@ static public function listParsers() {
$availableParsers[getMessage($ini['summary']['main_language'])][] = array('value'=>substr($file,0,-4),'label'=>$parserTitle);
if ($ini['summary']['main_language'] == $templateLanguage || $ini['summary']['main_language'] == 'International') {
- $defaultParsers = array_unshift( $defaultParsers, substr($file,0,-4) );
+ array_unshift( $defaultParsers, substr($file,0,-4) );
}
- else if (in_array($templateLanguage, createArray($ini['summary']['also_in']))) {
- $defaultParsers[] = substr($file,0,-4);
+ else {
+ if (isset($ini['summary']['also_in'])) {
+ if (in_array($templateLanguage, createArray($ini['summary']['also_in']))) {
+ $defaultParsers[] = substr($file,0,-4);
+ }
+ }
}
unset($ini,$parserTitle);
}

0 comments on commit 3aee194

Please sign in to comment.
Something went wrong with that request. Please try again.