Explorar o código

Using isset to check if prefix handlers have been initialized is faster.

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
84fb4390f9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -363,7 +363,7 @@ class Response {
         $prefix  = $header[0];
         $payload = substr($header, 1, -2);
 
-        if (self::$_prefixHandlers === null) {
+        if (!isset(self::$_prefixHandlers)) {
             self::$_prefixHandlers = self::initializePrefixHandlers();
         }
         if (!isset(self::$_prefixHandlers[$prefix])) {