desception Posted October 9, 2014 Share Posted October 9, 2014 Hello guys, not sure why I keep getting this error, can anyone help me? Here is the code: $ext=end(explode('.',$thum)); Link to comment https://forums.phpfreaks.com/topic/291545-php-strict-standards-only-variables-should-be-passed-by-reference/ Share on other sites More sharing options...
requinix Posted October 10, 2014 Share Posted October 10, 2014 Only recent versions of PHP (5.5+ I think) allow you to pass a non-variable to end(). If you're running an earlier version then you need a temporary variable. But there's a better way to get file extensions: $end = pathinfo($thum, PATHINFO_EXTENSION); Link to comment https://forums.phpfreaks.com/topic/291545-php-strict-standards-only-variables-should-be-passed-by-reference/#findComment-1493202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.