Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-02-10 00:49:11

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Whitespace and is_disabled()

Shouldn’t is_disabled() ignore whitespace (i.e. spaces)? The compatibility checks in diagnostics reports do, but is_disabled() doesn’t. If disable_functions property contains any spaces, it says that, for example, mail() isn’t disabled, which it is.

One line change to txplib_misc.php:

--- 4.x/textpattern/lib/txplib_misc.php	2012-02-10 02:37:20.000000000 +0200
+++ 4.x/textpattern/lib/txplib_misc.php	2012-02-10 02:56:09.000000000 +0200
@@ -1576,7 +1576,7 @@

 		if (!isset($disabled))
 		{
-			$disabled = explode(',', ini_get('disable_functions'));
+			$disabled = do_list(ini_get('disable_functions'));
 		}

 		return in_array($function, $disabled);

Last edited by Gocom (2012-02-10 00:57:11)

Offline

#2 2012-02-10 06:14:17

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: Whitespace and is_disabled()

Thanks. Fixed in change set 3630.

Offline

Board footer

Powered by FluxBB