Commit 7a76f100 authored by feronetick's avatar feronetick
Browse files

Лампочки в корзине

No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -14,7 +14,7 @@ class Request
*/
public static function getMethod ($method)
{
if (is_null(static::$methods[$method]))
if (!array_key_exists($method, static::$methods) || is_null(static::$methods[$method]))
{
$className = static::className($method);
......
......@@ -16,7 +16,7 @@ abstract class Singleton
// TODO PHP 5.5 поддерживает константу static::class
$class = get_called_class();
if (null == self::$instances[$class])
if (!array_key_exists($class, self::$instances) || null == self::$instances[$class])
{
self::$instances[$class] = new $class();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment