Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-6697 now.

$safe_mode variable is always set to TRUE in adm/index.php (fix completed in vcs)

I tried to edit a template and have it saved to the file system, but always the ACP Gui told me, the file is not writeable. I don't have safe mode on and the permissions are set alright.

I then read through the code and found out that the $safe_mode variable defindes in adm/index.php on line 48 gets always set to TRUE.

$safe_mode = (@ini_get('safe_mode') || @strtolower(ini_get('safe_mode')) == 'on') ? true : false;

ini_get('safe_mode') returns the string 'off' (in my case, which will result in the boolean value TRUE for the string is not empty. TRUE || anything is TRUE.. so $safe_mode will always be true, wether safe_mode is actually on or off.

Comments / History

Changed ticket status from "New" to "Reviewed"

Action performed by Kellanved (Former Team Member) on Dec 17th 2007, 11:43

Posted by Kellanved (Former Team Member) on Dec 17th 2007, 11:43

Indeed. Looks like a case for &&.

Assigned ticket to user "Kellanved"

Action performed by Acyd Burn (Server Manager) on Dec 27th 2007, 16:14

Changed ticket status from "Reviewed" to "Fix in progress"

Action performed by Kellanved (Former Team Member) on Jan 2nd 2008, 11:56

Linked ticket with changeset: r8291

Action performed by Kellanved (Former Team Member) on Jan 2nd 2008, 15:34

Changed ticket status from "Fix in progress" to "Fix completed in CVS"

Action performed by Kellanved (Former Team Member) on Jan 2nd 2008, 15:34

Ticket details

Related SVN changesets