Permalink
Browse files

BUGFIX Fixing RquestHandler->checkAccessAction() on PHP 5.2 - Reflect…

…ionMethod->class returns inconsisent results in older PHP versions. (see r102003) (from r102730)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112069 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 322a2da commit 64a561f96c1f7e4a6a0709fddce9e4f42d4773e6 @sminnee sminnee committed Oct 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/control/RequestHandler.php
@@ -275,7 +275,7 @@ function checkAccessAction($action) {
$r = new ReflectionClass(get_class($this));
if($r->hasMethod($actionOrigCasing)) {
$m = $r->getMethod($actionOrigCasing);
- return ($m && is_subclass_of($m->class, 'RequestHandler'));
+ return ($m && is_subclass_of($m->getDeclaringClass()->getName(), 'RequestHandler'));
} else {
throw new Exception("method_exists() true but ReflectionClass can't find method - PHP is b0kred");
}

0 comments on commit 64a561f

Please sign in to comment.