handle when sql error occurs and no params given

This commit is contained in:
Isaac Connor
2017-11-03 15:45:11 -04:00
parent f39353a4a3
commit 63c788ef0e

View File

@@ -141,7 +141,7 @@ if ( 0 ) {
Warning("SQL: $sql: rows:" . $result->rowCount() );
}
} catch(PDOException $e) {
Error( "SQL-ERR '".$e->getMessage()."', statement was '".$sql."' params:" . implode(',',$params) );
Error( "SQL-ERR '".$e->getMessage()."', statement was '".$sql."' params:" . $params?implode(',',$params):'' );
}
return( $result );
}