I am getting an error I have not seen on a progam I wrote a while ago. Not sure if the php version changed cause this or not. I am pretty basic when it comes to PHP so any insight would be great. Basically I am just getting some files from a folder, adding the image of the file if there is one (if not use stock image), then list them files.
`
$allowed_extensions = array("gif", "jpeg", "jpg", "png");
$files = glob('files/*');
natcasesort($files);
foreach($files as $file){
if(!in_array(end(explode(".",$file)),$allowed_extensions)){
$image = "http://fitter.henry-griffitts.com/fitter/images/pdf.png";
}else{
$image = $file;
}
echo '<div class="one_half"><img src="' . $image . '" class="images" /></br><h2>' .basename($file). '</h2><a class="download" href="http://fitter.henry-griffitts.com/fitter/download.php?file='.base64_encode($file).'"></a></div>';
}
?>
The error says its on this line if(!in_array(end(explode(".",$file)),$allowed_extensions)){
Error: Strict Standards: Only variables should be passed by reference