Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 lib/helper/UrlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ function _encodeText($text)

for ($i = 0; $i < strlen($text); $i++)
{
$char = $text{$i};
$char = $text[$i];
$r = mt_rand(0, 100);

# roughly 10% raw, 45% hex, 45% dec
Expand Down
16 changes: 8 additions & 8 deletions lib/i18n/sfDateFormat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function format($time, $pattern = 'F', $inputPattern = null, $charset = '
for ($i = 0, $max = count($tokens); $i < $max; $i++)
{
$pattern = $tokens[$i];
if ($pattern[0] == "'" && $pattern{strlen($pattern) - 1} == "'")
if ($pattern[0] == "'" && $pattern[(strlen($pattern) - 1)] == "'")
{
$tokens[$i] = str_replace('``````', '\'', preg_replace('/(^\')|(\'$)/', '', $pattern));
}
Expand Down Expand Up @@ -397,30 +397,30 @@ protected function getTokens($pattern)

for ($i = 0, $max = strlen($pattern); $i < $max; $i++)
{
if ($char == null || $pattern{$i} == $char || $text)
if ($char == null || $pattern[$i] == $char || $text)
{
$token .= $pattern{$i};
$token .= $pattern[$i];
}
else
{
$tokens[] = str_replace("''", "'", $token);
$token = $pattern{$i};
$token = $pattern[$i];
}

if ($pattern{$i} == "'" && $text == false)
if ($pattern[$i] == "'" && $text == false)
{
$text = true;
}
else if ($text && $pattern{$i} == "'" && $char == "'")
else if ($text && $pattern[$i] == "'" && $char == "'")
{
$text = true;
}
else if ($text && $char != "'" && $pattern{$i} == "'")
else if ($text && $char != "'" && $pattern[$i] == "'")
{
$text = false;
}

$char = $pattern{$i};
$char = $pattern[$i];

}
$tokens[] = $token;
Expand Down
2 changes: 1 addition & 1 deletion lib/i18n/sfNumberFormat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected function formatInteger($string)
// now for the integer groupings
for ($i = 0; $i < $len; $i++)
{
$char = $string{$len - $i - 1};
$char = $string[($len - $i - 1)];

if ($multiGroup && $count == 0)
{
Expand Down
6 changes: 3 additions & 3 deletions lib/i18n/sfNumberFormatInfo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ protected function parsePattern($pattern)
// to find the groupsize 1.
for ($i = strlen($pattern) - 1; $i >= 0; $i--)
{
if ($pattern{$i} == $digit || $pattern{$i} == $hash)
if ($pattern[$i] == $digit || $pattern[$i] == $hash)
{
$groupSize1 = $i - $groupPos1;
break;
Expand All @@ -335,11 +335,11 @@ protected function parsePattern($pattern)
{
for ($i = strlen($pattern) - 1; $i >= 0; $i--)
{
if ($pattern{$i} == $dot)
if ($pattern[$i] == $dot)
{
break;
}
if ($pattern{$i} == $digit)
if ($pattern[$i] == $digit)
{
$decimalPoints = $i - $decimalPos;
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/view/sfViewCacheManager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected function getCacheKeyVaryHeaderPart($internalUri, $vary = '')
{
$varys[] = $header . '-' . preg_replace('/\W+/', '_', $request->getHttpHeader($header));
}
$vary = implode($varys, '-');
$vary = implode('-', $varys);
}

return $vary;
Expand Down