mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update Object.php
Check to ensure `self::$extra_methods[$this->class][$method]` exists before trying to retrieve it. Prevents a bunch of notices from being generated.
This commit is contained in:
parent
214c6ddb8e
commit
02e31932f8
@ -908,10 +908,12 @@ abstract class SS_Object {
|
||||
$methods = $this->findMethodsFromExtension($extension);
|
||||
if ($methods) {
|
||||
foreach ($methods as $method) {
|
||||
$methodInfo = self::$extra_methods[$this->class][$method];
|
||||
if (isset(self::$extra_methods[$this->class][$method])) {
|
||||
$methodInfo = self::$extra_methods[$this->class][$method];
|
||||
|
||||
if ($methodInfo['property'] === $property && $methodInfo['index'] === $index) {
|
||||
unset(self::$extra_methods[$this->class][$method]);
|
||||
if ($methodInfo['property'] === $property && $methodInfo['index'] === $index) {
|
||||
unset(self::$extra_methods[$this->class][$method]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user