File tree 1 file changed +8
-14
lines changed
1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -364,20 +364,14 @@ public function save() {
364
364
$ stmt ->bindParam ( ':port ' , $ this ->port , PDO ::PARAM_INT );
365
365
$ stmt ->bindParam ( ':status ' , $ this ->status_bitmask , PDO ::PARAM_INT );
366
366
$ stmt ->bindParam ( ':type_id ' , $ this ->type_id , PDO ::PARAM_INT );
367
- if ( is_null ( $ this ->updated_datetime )) {
368
- $ stmt ->bindParam (
369
- ':updated_dt ' , $ this ->updated_datetime , PDO ::PARAM_NULL
370
- );
371
- } else {
372
- $ stmt ->bindParam (
373
- ':updated_dt ' , $ this ->updated_datetime , PDO ::PARAM_STR
374
- );
375
- }
376
- if ( is_null ( $ this ->user_id )) {
377
- $ stmt ->bindParam ( ':user_id ' , $ this ->user_id , PDO ::PARAM_NULL );
378
- } else {
379
- $ stmt ->bindParam ( ':user_id ' , $ this ->user_id , PDO ::PARAM_INT );
380
- }
367
+
368
+ $ stmt ->bindParam ( ':updated_dt ' , $ this ->updated_datetime , (
369
+ is_null ( $ this ->updated_datetime ) ? PDO ::PARAM_NULL : PDO ::PARAM_STR
370
+ ));
371
+
372
+ $ stmt ->bindParam ( ':user_dt ' , $ this ->user_id , (
373
+ is_null ( $ this ->user_id ) ? PDO ::PARAM_NULL : PDO ::PARAM_INT
374
+ ));
381
375
382
376
if (!$ stmt ->execute ()) {
383
377
throw new QueryException ( 'Cannot save server ' );
You can’t perform that action at this time.
0 commit comments