Replace deprecated trigger_error calls with exceptions
This commit is contained in:
@@ -24,7 +24,7 @@ class Registry
|
||||
public static function get($key)
|
||||
{
|
||||
if (!isset(self::$storage[$key]))
|
||||
trigger_error('Key does not exist in Registry: ' . $key, E_USER_ERROR);
|
||||
throw new Exception('Key does not exist in Registry: ' . $key);
|
||||
|
||||
return self::$storage[$key];
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class Registry
|
||||
public static function remove($key)
|
||||
{
|
||||
if (!isset(self::$storage[$key]))
|
||||
trigger_error('Key does not exist in Registry: ' . $key, E_USER_ERROR);
|
||||
throw new Exception('Key does not exist in Registry: ' . $key);
|
||||
|
||||
unset(self::$storage[$key]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user