Browse Source

Operator precedence allowed for strings that were not 4 or 8 characters long.

pull/507/head
Nigel Banks 11 years ago
parent
commit
16d24a3f9c
  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