File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1280,18 +1280,24 @@ public function now ($diff = null, $func = "NOW()") {
12801280
12811281 /**
12821282 * Method generates incremental function call
1283- * @param int increment amount . 1 by default
1283+ * @param int increment by int or float . 1 by default
12841284 */
12851285 public function inc ($ num = 1 ) {
1286- return Array ("[I] " => "+ " . (int )$ num );
1286+ if (!is_numeric ($ num )){
1287+ trigger_error ('Argument supplied to inc must be a number ' , E_USER_ERROR );
1288+ }
1289+ return Array ("[I] " => "+ " . $ num );
12871290 }
12881291
12891292 /**
12901293 * Method generates decrimental function call
1291- * @param int increment amount . 1 by default
1294+ * @param int increment by int or float . 1 by default
12921295 */
12931296 public function dec ($ num = 1 ) {
1294- return Array ("[I] " => "- " . (int )$ num );
1297+ if (!is_numeric ($ num )){
1298+ trigger_error ('Argument supplied to dec must be a number ' , E_USER_ERROR );
1299+ }
1300+ return Array ("[I] " => "- " . $ num );
12951301 }
12961302
12971303 /**
You can’t perform that action at this time.
0 commit comments