fixed error handling
This commit is contained in:
parent
0e179ac2ad
commit
5a023f5e0c
|
@ -52,14 +52,13 @@ class Gallery1DataParser {
|
||||||
is_readable($fileName . '.bak')) {
|
is_readable($fileName . '.bak')) {
|
||||||
$fileName .= '.bak';
|
$fileName .= '.bak';
|
||||||
} else {
|
} else {
|
||||||
return array(GalleryCoreApi::error(ERROR_BAD_PARAMETER, __FILE__, __LINE__,
|
return array('ERROR_BAD_PARAMETER', null);
|
||||||
"Missing or not readable file: $fileName"), null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$tmp = file($fileName);
|
$tmp = file($fileName);
|
||||||
|
|
||||||
if (empty($tmp)) {
|
if (empty($tmp)) {
|
||||||
return array(GalleryCoreApi::error(ERROR_MISSING_VALUE), null);
|
return array('ERROR_MISSING_VALUE', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp = join('', $tmp);
|
$tmp = join('', $tmp);
|
||||||
|
|
Reference in New Issue
Block a user