Skip to content
Merged
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 lib/generator/sfModelGenerator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function renderField($field)
}
else if ('Date' == $field->getType())
{
$html = sprintf("false !== strtotime($html) ? format_date(%s, \"%s\") : ' '", $html, $field->getConfig('date_format', 'f'));
$html = sprintf("is_string($html) && false !== strtotime($html) ? format_date(%s, \"%s\") : ' '", $html, $field->getConfig('date_format', 'f'));
}
else if ('Boolean' == $field->getType())
{
Expand Down
3 changes: 3 additions & 0 deletions lib/request/sfWebRequest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,9 @@ static public function convertFileInformation(array $taintedFiles)
*/
static protected function fixPhpFilesArray(array $data)
{
// remove full_path added on php8.1
unset($data['full_path']);

$fileKeys = array('error', 'name', 'size', 'tmp_name', 'type');
$keys = array_keys($data);
sort($keys);
Expand Down
2 changes: 1 addition & 1 deletion lib/util/sfBrowserBase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ public function doClickElement(DOMElement $item, $arguments = array(), $options
}
else
{
$queryString = is_array($arguments) ? http_build_query($arguments, null, '&') : '';
$queryString = is_array($arguments) ? http_build_query($arguments, '', '&') : '';
$sep = false === strpos($url, '?') ? '?' : '&';

return array($url.($queryString ? $sep.$queryString : ''), 'get', array());
Expand Down
4 changes: 2 additions & 2 deletions lib/view/sfViewCacheManager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,10 @@ public function getCurrentCacheKey()
{
$cacheKey = $this->routing->getCurrentInternalUri();

if ($getParameters = $this->request->getGetParameters())
if ($cacheKey && $getParameters = $this->request->getGetParameters())
{
$cacheKey .= false === strpos($cacheKey, '?') ? '?' : '&';
$cacheKey .= http_build_query($getParameters, null, '&');
$cacheKey .= http_build_query($getParameters, '', '&');
}

return $cacheKey;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/sfNoRouting.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getCurrentInternalUri($with_route_name = false)
// other parameters
unset($parameters['module'], $parameters['action']);
ksort($parameters);
$parameters = count($parameters) ? '?'.http_build_query($parameters, null, '&') : '';
$parameters = count($parameters) ? '?'.http_build_query($parameters, '', '&') : '';

return sprintf('%s%s', $action, $parameters);
}
Expand All @@ -49,7 +49,7 @@ public function generate($name, $params = array(), $absolute = false)
unset($parameters['action']);
}

$parameters = http_build_query($parameters, null, '&');
$parameters = http_build_query($parameters, '', '&');

return $this->fixGeneratedUrl('/'.($parameters ? '?'.$parameters : ''), $absolute);
}
Expand Down