Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » is_dir error in security tab

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1227 Views
  • Apophenian
    Community Member
    46 Posts

    is_dir error in security tab Link to this post

    When selecting one of the user groups in the security tab, i was getting an is_dir error in saphhire/core/i18n.php in the get_existing_translations(). The server is pretty well locked down, and was bailing when the method was looping over the ".." directory in the root.

    I put this little hack in (there is probably a 'right' way to do this in php, but I don't know it)
    $moduleDir = $baseDir . DIRECTORY_SEPARATOR . $module;
    $langDir = $moduleDir . DIRECTORY_SEPARATOR . "lang";
    if (substr ($moduleDir, -2) == ".." || substr ($langDir, -2) == "..")

    which seemed to fix it...



  • streetdaddy
    32 Posts

    Re: is_dir error in security tab Link to this post

    nice one, works for me, does the job!

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.