diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2020-02-13 11:15:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-13 11:15:05 +0300 |
commit | 0fdca6cf4a216cd384529f0ecf2af3089ea6c274 (patch) | |
tree | a10c7875cd25bad2701aa21ad722824fd1b92cce /libs/Zend/Validate | |
parent | baaca8b2bbf1eecb283e45f6347dfd3c3274b818 (diff) |
Prevent possible notice curly braces on array (#15560)
Diffstat (limited to 'libs/Zend/Validate')
-rw-r--r-- | libs/Zend/Validate/Isbn.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/Zend/Validate/Isbn.php b/libs/Zend/Validate/Isbn.php index 980afc7f7a..2edf21d1dd 100644 --- a/libs/Zend/Validate/Isbn.php +++ b/libs/Zend/Validate/Isbn.php @@ -168,7 +168,7 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract $isbn10 = str_replace($this->_separator, '', $value); $sum = 0; for ($i = 0; $i < 9; $i++) { - $sum += (10 - $i) * $isbn10{$i}; + $sum += (10 - $i) * $isbn10[$i]; } // checksum @@ -186,9 +186,9 @@ class Zend_Validate_Isbn extends Zend_Validate_Abstract $sum = 0; for ($i = 0; $i < 12; $i++) { if ($i % 2 == 0) { - $sum += $isbn13{$i}; + $sum += $isbn13[$i]; } else { - $sum += 3 * $isbn13{$i}; + $sum += 3 * $isbn13[$i]; } } // checksum |