mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 00:21:59 +01:00
sphinx query shall handle execute exceptions
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
18a0ff5678
commit
b463da69fa
@ -39,8 +39,11 @@ class Sphinx {
|
||||
$s = $this->link->prepare($sql);
|
||||
if(!$s) { return $query; }
|
||||
|
||||
if(!$s->execute($arr)) {
|
||||
syslog(LOG_INFO, $s->errorInfo()[2]);
|
||||
try {
|
||||
$s->execute($arr);
|
||||
} catch(PDOException $exception) {
|
||||
syslog(LOG_INFO, "ERROR: " . $exception->getMessage());
|
||||
return $query;
|
||||
}
|
||||
|
||||
$this->affected = $s->rowCount();
|
||||
|
Loading…
Reference in New Issue
Block a user