[icinga-checkins] icinga.org: icinga-web/next: Should fix PHP update to version > 5.3. 3 crashing cronks

git at icinga.org git at icinga.org
Thu Mar 7 13:42:28 CET 2013


Module: icinga-web
Branch: next
Commit: 48a0fd4b1676c3fcf4f1b932c6ed93cd85c3e1c2
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=48a0fd4b1676c3fcf4f1b932c6ed93cd85c3e1c2

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Thu Mar  7 13:39:11 2013 +0100

Should fix PHP update to version > 5.3.3 crashing cronks

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

---

 .../ViewProc/MetaInformationSuccessView.class.php  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/views/System/ViewProc/MetaInformationSuccessView.class.php b/app/modules/Cronks/views/System/ViewProc/MetaInformationSuccessView.class.php
index c428ef3..ba4bbeb 100644
--- a/app/modules/Cronks/views/System/ViewProc/MetaInformationSuccessView.class.php
+++ b/app/modules/Cronks/views/System/ViewProc/MetaInformationSuccessView.class.php
@@ -42,7 +42,7 @@ class Cronks_System_ViewProc_MetaInformationSuccessView extends CronksBaseView {
 
             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();
@@ -67,4 +67,4 @@ class Cronks_System_ViewProc_MetaInformationSuccessView extends CronksBaseView {
     
 }
 
-?>
\ No newline at end of file
+?>





More information about the icinga-checkins mailing list