Post by briket » Fri Jun 05, 2015 7:58 pm

Whenever I try to upload an image I get the follwing error:

Notice: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' in /mnt/webu/c3/36/54636236/htdocs/admin/controller/common/filemanager.php on line 37Warning: glob() expects parameter 2 to be long, string given in /mnt/webu/c3/36/54636236/htdocs/admin/controller/common/filemanager.php on line 37

Hope anyone can help thanks in advance

Newbie

Posts

Joined
Fri Jun 05, 2015 7:55 pm

Post by deepvision » Sat Jun 06, 2015 12:41 pm

The GLOB_BRACE flag is not available on some non GNU systems, like Solaris or AIX.

The code

Code: Select all

$files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
should probably be replaced with something like

Code: Select all

        $files = array_merge(
            glob($directory . '/' . $filter_name . '*.jpg'),
            glob($directory . '/' . $filter_name . '*.jpeg'),
            glob($directory . '/' . $filter_name . '*.png'),
            glob($directory . '/' . $filter_name . '*.gif'),
            glob($directory . '/' . $filter_name . '*.JPG'),
            glob($directory . '/' . $filter_name . '*.JPEG'),
            glob($directory . '/' . $filter_name . '*.PNG'),
            glob($directory . '/' . $filter_name . '*.GIF')
        );

ImageImageImage


User avatar
Active Member

Posts

Joined
Tue May 19, 2015 1:03 am

Post by briket » Sat Jun 06, 2015 5:18 pm

This works, thanks a lot

Newbie

Posts

Joined
Fri Jun 05, 2015 7:55 pm
Who is online

Users browsing this forum: No registered users and 73 guests