summaryrefslogtreecommitdiffstats
path: root/system/codeigniter/CodeIgniter.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-02-27 06:19:50 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-02-27 06:19:50 +0100
commit8a1607772c5e9221884d9f0a39a514536f1fe21d (patch)
tree7a2033dc494d5656427ec16656374d6acfd7bab0 /system/codeigniter/CodeIgniter.php
parent2c6dda41c8207ffa704934a1fbde65769ce86992 (diff)
added improved check for controller method access so that CI does not attempt to load private or protected controller methods
added controller/method details to framework initiated 404 pages for logging
Diffstat (limited to 'system/codeigniter/CodeIgniter.php')
-rw-r--r--system/codeigniter/CodeIgniter.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 8f9dbdf64..d1ef965cc 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -169,7 +169,7 @@ if ( ! class_exists($class)
OR in_array($method, get_class_methods('Controller'), TRUE)
)
{
- show_404();
+ show_404("{$class}/{$method}");
}
/*
@@ -214,9 +214,11 @@ else
}
else
{
- if ( ! method_exists($CI, $method))
+ // is_callable() returns TRUE on some versions of PHP 5 for private and protected
+ // methods, so we'll use this workaround for consistent behavior
+ if (! in_array($method, get_class_methods($CI)))
{
- show_404();
+ show_404("{$class}/{$method}");
}
// Call the requested method.