Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

is_dir error in security tab


Go to End


2 Posts   1528 Views

Avatar
Apophenian

Community Member, 46 Posts

27 August 2008 at 8:29pm

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) == "..")
continue;

which seemed to fix it...

Cheers,

Rane

Avatar
streetdaddy

32 Posts

4 September 2008 at 1:20pm

nice one, works for me, does the job!