MDL-80677 core: deprecation::from should always return
This commit is contained in:
@@ -83,6 +83,9 @@ class deprecation {
|
||||
// The reference is an array, but it's not an object or a class that currently exists.
|
||||
return null;
|
||||
}
|
||||
|
||||
// The reference is none of the above.
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -285,6 +285,9 @@ class deprecation_test extends \advanced_testcase {
|
||||
// Deprecated global function.
|
||||
['core\fixtures\deprecated_function', true],
|
||||
['core\fixtures\not_deprecated_function', false],
|
||||
|
||||
// Empty array.
|
||||
[[], false],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user