Skip to content

Commit

Permalink
fix last phpcs errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hinanaya committed Jun 14, 2024
1 parent bd5bdd1 commit 4021db3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions models/media_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1211,9 +1211,11 @@ public function validate($args = [])

// validate if select
// note that value can be selected by index as well, so only invalidate if neither value nor valid index is used
if ($metadata_field['type'] == 'select' && $metadata_value != ''
&& array_search($metadata_value, $metadata_field['settings']->options) === false
&& (! ctype_digit($metadata_value) || intval($metadata_value) < 0 || intval($metadata_value) > count($metadata_field['settings']->options) )) {
if (
$metadata_field['type'] == 'select' && $metadata_value != ''
&& array_search($metadata_value, $metadata_field['settings']->options) === false
&& (! ctype_digit($metadata_value) || intval($metadata_value) < 0 || intval($metadata_value) > count($metadata_field['settings']->options) )
) {
return array(false,$item['local_id'],$metadata_field['description'] . ' value not valid.');
}

Expand Down

0 comments on commit 4021db3

Please sign in to comment.