From f9022a7cf5be95ffab57ad3b80e9b2011864d2ab Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Wed, 13 Feb 2013 12:15:09 -0400 Subject: [PATCH] BUG 10808 Error assigning Porcess Permissions or Process Supervisor SOLVED - Missing validation when "glob" function return a boolean value - Add validation --- gulliver/system/class.xmlform.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index f73f48a2f..a5ff6fed6 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -5123,8 +5123,10 @@ class XmlForm $newVersion = false; if ($forceParse || ((! file_exists( $this->parsedFile )) || (filemtime( $filename ) > filemtime( $this->parsedFile )) || (filemtime( __FILE__ ) > filemtime( $this->parsedFile ))) || (! file_exists( $this->scriptFile )) || (filemtime( $filename ) > filemtime( $this->scriptFile ))) { - foreach (glob( $filesToDelete ) as $fileToDelete) { - @unlink( $fileToDelete ); + if (glob( $filesToDelete )) { + foreach (glob( $filesToDelete ) as $fileToDelete) { + @unlink( $fileToDelete ); + } } $this->tree = new Xml_Document(); $this->tree->parseXmlFile( $filename );