Bladeren bron

Fix missing change that should have been part of commit cc2349c.

Daniele Alessandri 14 jaren geleden
bovenliggende
commit
deeb58644a
1 gewijzigde bestanden met toevoegingen van 2 en 3 verwijderingen
  1. 2 3
      lib/Predis/Protocols/Text/TextProtocol.php

+ 2 - 3
lib/Predis/Protocols/Text/TextProtocol.php

@@ -79,11 +79,10 @@ class TextProtocol implements IProtocolProcessor {
                 return (int) $payload;
                 return (int) $payload;
 
 
             case '-':    // error
             case '-':    // error
-                $errorMessage = substr($payload, 4);
                 if ($this->_throwErrors) {
                 if ($this->_throwErrors) {
-                    throw new ServerException($errorMessage);
+                    throw new ServerException($payload);
                 }
                 }
-                return new ResponseError($errorMessage);
+                return new ResponseError($payload);
 
 
             default:
             default:
                 Helpers::onCommunicationException(new ProtocolException(
                 Helpers::onCommunicationException(new ProtocolException(