mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Allow for short versions in Deprecation::notification_version()
This commit is contained in:
parent
183396a8ab
commit
f55bd9d3af
@ -131,13 +131,14 @@ class Deprecation {
|
||||
// Never raise deprecation notices in a live environment
|
||||
if(Director::isLive()) return;
|
||||
|
||||
// If you pass #.#, assume #.#.0
|
||||
if(preg_match('/^[0-9]+\.[0-9]+$/', $atVersion)) $atVersion .= '.0';
|
||||
|
||||
$checkVersion = self::$version;
|
||||
// Getting a backtrace is slow, so we only do it if we need it
|
||||
$backtrace = null;
|
||||
|
||||
// If you pass #.#, assume #.#.0
|
||||
if(preg_match('/^[0-9]+\.[0-9]+$/', $atVersion)) $atVersion .= '.0';
|
||||
if(preg_match('/^[0-9]+\.[0-9]+$/', $checkVersion)) $checkVersion .= '.0';
|
||||
|
||||
if(self::$module_version_overrides) {
|
||||
$module = self::get_calling_module_from_trace($backtrace = debug_backtrace(0));
|
||||
if(isset(self::$module_version_overrides[$module])) {
|
||||
|
Loading…
Reference in New Issue
Block a user