Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Error when trying to access themes: Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'

edited March 2010 in Vanilla 2.0 - 2.8
Hi!

Every time I try to access the Themes-section of the Dashboard, I get this error:

Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'
The error occurred on or near: xxx/forum/applications/garden/views/settings/themes.php
25: $Author = ArrayValue('Author', $this->EnabledTheme, '');
26: $AuthorUrl = ArrayValue('AuthorUrl', $this->EnabledTheme, '');
27: $NewVersion = ArrayValue('NewVersion', $this->EnabledTheme, '');
28: $Upgrade = $NewVersion != '' && version_compare($NewVersion, $Version, '>');
29: $PreviewImage = SafeGlob(PATH_THEMES . DS . $this->EnabledThemeFolder . DS . "screenshot{.gif,.jpg,.png}", GLOB_BRACE);
30: $PreviewImage = count($PreviewImage) > 0 ? basename($PreviewImage[0]) : FALSE;
31: if ($PreviewImage)
32: echo Img('/themes/'.$this->EnabledThemeFolder.'/'.$PreviewImage, array('alt' => $this->EnabledThemeName, 'height' => '112', 'width' => '150'));
33:


Any ideas what could cause this?

Comments

  • I deleted the two GLOB_BRACE -parts in the themes.php
    Now I can access the themes-section...
  • MarkMark Vanilla Staff
    What version of PHP are you using? GLOB_BRACE is a php constant: http://php.net/manual/en/function.glob.php

  • Application: Garden
    Application Version: 1.0
    PHP Version: 5.2.12
    Operating System: SunOS
    Referer: http://forum.mannoderquadrat.de/index.php/garden/settings
    User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; de-de) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
    Request Uri: /index.php/garden/settings/themes
    Controller: PHP
    Method: ErrorHandler
  • I upgraded to the newest vanilla 2-files, but I'm now getting a "bonk"-message when I'm trying to access the themes-secton...
  • MarkMark Vanilla Staff
    Add this to your conf/config.php file to see the actual error:

    $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php';
  • I think I've seen this post a lot... while it's unreleased, shouldn't this be on by default?

    Fail-Whaling that, couldn't ther just be a "show-me-the-gorry-detail" button beneath the "Bonk!" message that does just that? That would keep things pretty but still enable people to provide useful error messages. Again, perhaps just only while V2 is unreleased?
  • Did this, the error is still the same:


    Fatal Error in PHP.ErrorHandler();

    Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'
  • lucluc ✭✭
    @Mark, @[-Stash-], I've just made a change to have the deverror view when installing, and revert to the bonk message once it's installed.

    @Mark: is there any way to add a comment after a configuration option in conf.php?
    I owuld have like to add comment about removing/commenting this specific line to have a more meaningfull message (ie. revert to the view in config-default).
  • I have the same problem when I click on the 'Themes' link.

    Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE'

    The error occurred on or near: /users/home/mark/domains/pickl-it.com/web/public/Garden/applications/garden/views/settings/themes.php

    29: $PreviewImage = SafeGlob(PATH_THEMES . DS . $this->EnabledThemeFolder . DS . "screenshot{.gif,.jpg,.png}", GLOB_BRACE);
Sign In or Register to comment.