Commit 18807c9c authored by kiz_0987's avatar kiz_0987
Browse files

Make checking for a valid gallery install more robust (do not just trust the...

Make checking for a valid gallery install more robust (do not just trust the gallery_valid variable, but always do an isreadable check as well -- avoid case of a moved drupal/g2 installation causing PHP errors).
parent 5ca0c573
......@@ -29,7 +29,7 @@ function _gallery_init($full = false, $vars = null) {
$gallery_valid = $vars['gallery_valid'];
}
if (!$gallery_valid) {
if ((!$gallery_valid) || (!is_readable($embedPath))) {
// It's probably now bad practice to return a null here, given that $ret=null is a gallery2
// success response
return array(false, null);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment