File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -390,10 +390,12 @@ private function handleError($packet) {
390
390
$ this ->parseCallback = null ;
391
391
if ($ this ->connectionState == self ::READY ) {
392
392
// normal error
393
- if ($ this ->config ->exceptions ) {
394
- $ this ->getDeferred ()->fail (new QueryException ("MySQL error ( {$ this ->connInfo ->errorCode }): {$ this ->connInfo ->errorState } {$ this ->connInfo ->errorMsg }" , $ this ->query ));
395
- } else {
396
- $ this ->getDeferred ()->resolve (false );
393
+ if ($ deferred = $ this ->getDeferred ()) {
394
+ if ($ this ->config ->exceptions ) {
395
+ $ deferred ->fail (new QueryException ("MySQL error ( {$ this ->connInfo ->errorCode }): {$ this ->connInfo ->errorState } {$ this ->connInfo ->errorMsg }" , $ this ->query ));
396
+ } else {
397
+ $ deferred ->resolve (false );
398
+ }
397
399
}
398
400
$ this ->query = null ;
399
401
$ this ->ready ();
You can’t perform that action at this time.
0 commit comments