summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-05 15:40:32 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-05 15:40:32 +0100
commit522c73623b46afc9082ac7c8af5c34bf1b4f47f4 (patch)
tree8bda24af1b16fe30004a40fa5194690588dd5aa6 /system/core
parent8e8937b01d47597bae5d1c7736b4e2057e2291d6 (diff)
Revert usage of is_callable() in system/core/CodeIgniter.php
Seems to be causing issues (see #1970). Also updated the Controller docs, mainly to include an important note related to #1967.
Diffstat (limited to 'system/core')
-rw-r--r--system/core/CodeIgniter.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 1cd6403bf..89081b572 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -295,7 +295,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
}
else
{
- if ( ! is_callable(array($class, $method)))
+ // WARNING: It appears that there are issues with is_callable() even in PHP 5.2!
+ // Furthermore, there are bug reports and feature/change requests related to it
+ // that make it unreliable to use in this context. Please, DO NOT change this
+ // work-around until a better alternative is available.
+ if ( ! in_array(strtolower($method), array_map('strtolower', get_class_methods($class)), TRUE))
{
if (empty($RTR->routes['404_override']))
{