Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array and string offset access syntax with curly braces #1047

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/core/Mage/Eav/Model/Entity/Increment/Alphanum.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getNextId()
$p = 0;
$bumpNextChar = true;
}
$nextId = $chars{$p}.$nextId;
$nextId = $chars[$p].$nextId;
}

return $this->format($nextId);
Expand Down
4 changes: 2 additions & 2 deletions app/code/core/Mage/Eav/Model/Entity/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1231,14 +1231,14 @@ public function installEntities($entities = null)
if (!empty($attr['frontend'])) {
if ('_' === $attr['frontend']) {
$attr['frontend'] = $frontendPrefix;
} elseif ('_' === $attr['frontend']{0}) {
} elseif (strpos($attr['frontend'], '_') === 0) {
$attr['frontend'] = $frontendPrefix.$attr['frontend'];
}
}
if (!empty($attr['source'])) {
if ('_' === $attr['source']) {
$attr['source'] = $sourcePrefix;
} elseif ('_' === $attr['source']{0}) {
} elseif (strpos($attr['source'], '_') === 0) {
$attr['source'] = $sourcePrefix . $attr['source'];
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Net/IDNA2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2700,7 +2700,7 @@ private function _decode($encoded)

for ($enco_idx = ($delim_pos)? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len) {
for ($old_idx = $idx, $w = 1, $k = $this->_base; 1 ; $k += $this->_base) {
$digit = $this->_decodeDigit($encoded{$enco_idx++});
$digit = $this->_decodeDigit($encoded[$enco_idx++]);
$idx += $digit * $w;

$t = ($k <= $bias) ?
Expand Down Expand Up @@ -3112,7 +3112,7 @@ private function _utf8_to_ucs4($input)
$mode = 'next';
$test = 'none';
for ($k = 0; $k < $inp_len; ++$k) {
$v = ord($input{$k}); // Extract byte from input string
$v = ord($input[$k]); // Extract byte from input string

if ($v < 128) { // We found an ASCII char - put into stirng as is
$output[$out_len] = $v;
Expand Down Expand Up @@ -3279,7 +3279,7 @@ private function _ucs4_string_to_ucs4($input)
$out_len++;
$output[$out_len] = 0;
}
$output[$out_len] += ord($input{$i}) << (8 * (3 - ($i % 4) ) );
$output[$out_len] += ord($input[$i]) << (8 * (3 - ($i % 4) ) );
}
return $output;
}
Expand Down