mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
322a2da0dc
commit
64a561f96c
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user