Skip to content

Commit

Permalink
#120 - fallback if update fails
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Nov 20, 2013
1 parent 0322bac commit cf32691
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/lib/kissmvc.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ function update() {
$s = substr($s,1);
$sql = 'UPDATE '.$this->enquote($this->tablename).' SET '.$s.' WHERE '.$this->enquote($this->pkname).'=?';
$stmt = $dbh->prepare($sql);
// #120 - if preparation failed exist now
if( !$stmt ) return;
$i=0;
foreach ($this->rs as $k => $v)
$stmt->bindValue(++$i,is_scalar($v) ? $v : ($this->COMPRESS_ARRAY ? gzdeflate(serialize($v)) : serialize($v)) );
Expand Down

0 comments on commit cf32691

Please sign in to comment.