Browse Source

Merge pull request #7 from nigelgbanks/7.x-code-review

Operator precedence allowed for strings that were not 4 or 8 characters ...
pull/507/head
qadan 10 years ago
parent
commit
d46d76e157
  1. 2
      tests/includes/datastream_validators.inc

2
tests/includes/datastream_validators.inc

@ -28,7 +28,7 @@ function islandora_hex2int($hex) {
drupal_set_message(t('String passed to islandora_hex2int() contains non-hexidecimal characters.'), 'error'); drupal_set_message(t('String passed to islandora_hex2int() contains non-hexidecimal characters.'), 'error');
return FALSE; return FALSE;
} }
if (!strlen($hex) === 4 || !strlen($hex) === 8) { if (!(strlen($hex) == 4 || strlen($hex) == 8)) {
drupal_set_message(t('String passed to islandora_hex2int() cannot create a 16- or 32-bit little-endian signed integer'), 'error'); drupal_set_message(t('String passed to islandora_hex2int() cannot create a 16- or 32-bit little-endian signed integer'), 'error');
return FALSE; return FALSE;
} }

Loading…
Cancel
Save