diff --git a/library/think/Request.php b/library/think/Request.php index e3fa3a4f..f5bab0bb 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -1542,7 +1542,7 @@ class Request $key = call_user_func_array($key, [$this]); } elseif (true === $key) { foreach ($except as $rule) { - if (0 === strpos($this->url(), $rule)) { + if (0 === stripos($this->url(), $rule)) { return; } } diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index fa773e51..2c2b9a8c 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -386,7 +386,7 @@ abstract class Connection return $this->close()->query($sql, $bind, $master, $pdo); } throw new PDOException($e, $this->config, $this->getLastsql()); - } catch (\ErrorException $e) { + } catch (\Exception $e) { if ($this->isBreak($e)) { return $this->close()->query($sql, $bind, $master, $pdo); } @@ -449,7 +449,7 @@ abstract class Connection return $this->close()->execute($sql, $bind); } throw new PDOException($e, $this->config, $this->getLastsql()); - } catch (\ErrorException $e) { + } catch (\Exception $e) { if ($this->isBreak($e)) { return $this->close()->execute($sql, $bind); }