BUGFIX: Deprecation notices should fire in test mode too, just not in live mode

This commit is contained in:
Hamish Friedlander 2011-10-31 13:51:31 +13:00
parent 7978dd5d40
commit bc7217d1ea

View File

@ -122,7 +122,8 @@ class Deprecation {
* @return void
*/
public static function notice($atVersion, $string = '') {
if(!Director::isDev()) return;
// 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';