mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Reverted broken optimisation in r83439
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83477 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
49e7ca8e7c
commit
27a5961cba
@ -261,21 +261,20 @@ abstract class Object {
|
||||
* @return mixed
|
||||
*/
|
||||
public static function uninherited_static($class, $name) {
|
||||
if(isset(self::$cache_is_inherited[$class][$name])) {
|
||||
return self::$cache_is_inherited[$class][$name] ? null : self::get_static($class, $name);
|
||||
$inherited = self::get_static($class, $name);
|
||||
$parent = null;
|
||||
|
||||
} else {
|
||||
$inherited = self::get_static($class, $name);
|
||||
$parent = null;
|
||||
if($parentClass = get_parent_class($class)) {
|
||||
$parent = self::get_static($parentClass, $name);
|
||||
}
|
||||
if($parentClass = get_parent_class($class)) {
|
||||
$parent = self::get_static($parentClass, $name);
|
||||
}
|
||||
|
||||
self::$cache_is_inherited[$class][$name] = ($inherited == $parent);
|
||||
return ($inherited == $parent) ? null : $inherited;
|
||||
}
|
||||
if(is_array($inherited) && is_array($parent)) {
|
||||
return array_diff_assoc($inherited, $parent);
|
||||
}
|
||||
|
||||
return ($inherited != $parent) ? $inherited : null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Cache the results of whether or not a given var is inherited.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user