From 92d2e8540d2c86707a11b46ae862355c452e2c08 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 10 Feb 2017 18:43:13 +0800 Subject: [PATCH] fix mysqli_sql_exception::$getCode --- Libs/Mmysqli.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libs/Mmysqli.php b/Libs/Mmysqli.php index f972d2f..ca2d73c 100644 --- a/Libs/Mmysqli.php +++ b/Libs/Mmysqli.php @@ -45,7 +45,7 @@ public function query( $query,$resultmode=MYSQLI_STORE_RESULT ){ try { return parent::query($query,$resultmode); } catch (\mysqli_sql_exception $e) { - if ($e->getCode() == 2006 || $e->getCode == 2013) { + if ($e->getCode() == 2006 || $e->getCode() == 2013) { $this->close(); $this->connect_db(); return parent::query($query,$resultmode);