MDL-80677 core: deprecation::from should always return

This commit is contained in:
Andrew Nicols
2024-03-11 21:48:32 +08:00
parent 57ec38d136
commit f09d886f11
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -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;
}
/**
+3
View File
@@ -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],
];
}