BUGFIX Fixing RquestHandler->checkAccessAction() on PHP 5.2 - ReflectionMethod->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
This commit is contained in:
Sam Minnee 2010-10-13 01:46:02 +00:00
parent 322a2da0dc
commit 64a561f96c

View File

@ -275,7 +275,7 @@ class RequestHandler extends ViewableData {
$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");
}