Skip to content

Commit

Permalink
Prevent possible notice curly braces on array (matomo-org#15560)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur authored and jonasgrilleres committed Sep 22, 2020
1 parent 8b11948 commit e370f20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/HTML/QuickForm2/Element/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function __construct($name = null, $attributes = null, $data = null)
$separator = '';

for ($i = 0, $length = strlen($this->data['format']); $i < $length; $i++) {
$sign = $this->data['format']{$i};
$sign = $this->data['format'][$i];
if ($backslash) {
$backslash = false;
$separator .= $sign;
Expand Down
6 changes: 3 additions & 3 deletions libs/Zend/Validate/Isbn.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function isValid($value)
$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
Expand All @@ -186,9 +186,9 @@ public function isValid($value)
$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
Expand Down

0 comments on commit e370f20

Please sign in to comment.