Skip to content

Commit 25baa59

Browse files
committed
Update MysqliDb.php
1 parent 5923bad commit 25baa59

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

MysqliDb.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,9 @@ public function now ($diff = null, $func = "NOW()") {
12831283
* @param int increment by int or float. 1 by default
12841284
*/
12851285
public function inc($num = 1) {
1286+
if(!is_numeric($num)){
1287+
trigger_error('Argument supplied to inc must be a number', E_USER_ERROR);
1288+
}
12861289
return Array ("[I]" => "+" . $num);
12871290
}
12881291

@@ -1291,6 +1294,9 @@ public function inc($num = 1) {
12911294
* @param int increment by int or float. 1 by default
12921295
*/
12931296
public function dec ($num = 1) {
1297+
if(!is_numeric($num)){
1298+
trigger_error('Argument supplied to dec must be a number', E_USER_ERROR);
1299+
}
12941300
return Array ("[I]" => "-" . $num);
12951301
}
12961302

0 commit comments

Comments
 (0)