This commit is contained in:
thinkphp
2017-06-28 23:38:22 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}