Receiving this error when using PHP to create an image gallery; "Strict Standards: Only variables should be passed by reference in (filename) on line 5"
Does anyone know how to either fix or hide this error? As the actual gallery works fine with the error. Thanks!
Below is the code:
public function getImages($extensions = array('jpg', 'png')) {
$images = $this->getDirectory($this->path);
foreach($images as $index => $image) {
$extension = strtolower(end(explode('.', $image)));
if(!in_array($extension, $extensions)) {
unset($images[$index]);
} else {
$images[$index] = array(
'full' => $this->path . '/' . $image,
'thumb' => $this->path . '/thumbs/' . $image,
);
}
}
return (count($images)) ? $images : false;
}