File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ public function recording_default_values_save()
231231 return [false , 'No default album provided. ' ];
232232 }
233233
234- if ($ coreFields ['year ' ] === 'required ' && ! ctype_digit ($ this ->data ['year ' ])) {
234+ if ($ coreFields ['year ' ] === 'required ' && ! ctype_digit (( string ) $ this ->data ['year ' ])) {
235235 //T No default year provided.
236236 return [false , 'No default year provided. ' ];
237237 }
@@ -271,12 +271,13 @@ public function recording_default_values_save()
271271 if (
272272 $ field ['type ' ] === 'select ' &&
273273 (! in_array ($ value , $ field ['settings ' ]->options ) &&
274- (! ctype_digit ($ value ) || count ($ field ['settings ' ]->options ) < intval ($ value ) || intval ($ value ) < 0 ))
274+ (! ctype_digit (( string ) $ value ) || count ($ field ['settings ' ]->options ) < intval ($ value ) || intval ($ value ) < 0 ))
275275 ) {
276276 return [false , 'Selected value not in allowed options for custom field ` ' . $ field ['name ' ] . '` ' ];
277277 }
278278
279- if ($ field ['type ' ] === 'integer ' && ! ctype_digit ($ value )) {
279+ if ($ field ['type ' ] === 'integer ' && ! ctype_digit ((string ) $ value )) {
280+ var_dump ($ value );
280281 return [false , 'Value for custom field ` ' . $ field ['name ' ] . '` must be an integer ' ];
281282 }
282283 }
You can’t perform that action at this time.
0 commit comments