Welcome Guest, Not a member yet? Register   Sign In
wrong directory separator in file helper
#1

[eluser]Unknown[/eluser]
I was reading files from a directory but could not output the names of the files. So I looked in File_helper and the method get_file_info. There on line 294 the method is using '/' as a separator which does not match the separators in my windows-environment. So I chenged it to 'DIRECTORY_SEPARATOR' and then it worked.

So is this not a bug?


File_helper line 294:

$fileinfo['name'] = substr(strrchr($file, '/'), 1);
>>>
$fileinfo['name'] = substr(strrchr($file, DIRECTORY_SEPARATOR), 1);




Theme © iAndrew 2016 - Forum software by © MyBB