mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:00:11 +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