Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Should fix PHP update to version > 5.3.3 crashing cronks
Browse files Browse the repository at this point in the history
Fixed SplFileObject casting behaviour crashing PHP 5.3.3. AppKitFileUtil::getAlternateFilename
does not, as the method would suggest, return a filename, but an SplFileObject instead.
This is being cast to a string in file_exists() previously, but it seems that this behaviour
does not apply anymore in PHP 5.3.3+. So MetaInformationSuccessView now call $file->getRealPath()
to safely get the templates file path.

refs #3751
  • Loading branch information
Jannis Mosshammer committed Mar 7, 2013
1 parent 9cccc04 commit 48a0fd4
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -42,7 +42,7 @@ public function executeJson(AgaviRequestDataHolder $rd) {

if($file === null)
$file = AppKitFileUtil::getAlternateFilename(AgaviConfig::get('modules.cronks.xml.path.grid'), $rd->getParameter('template'), '.xml');
$template = new CronkGridTemplateXmlParser($file);
$template = new CronkGridTemplateXmlParser($file->getRealPath());
$template->parseTemplate();
$user = $this->getContext()->getUser()->getNsmUser();
$data = $template->getTemplateData();
Expand All @@ -67,4 +67,4 @@ public function executeJson(AgaviRequestDataHolder $rd) {

}

?>
?>

0 comments on commit 48a0fd4

Please sign in to comment.