[Fusionforge-commits] FusionForge branch master updated. 11dbbd972a75c8986cfe3166dcaef92c64f24ae5

Franck VILLAUME nerville at fusionforge.org
Sun Jan 6 18:38:27 CET 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  11dbbd972a75c8986cfe3166dcaef92c64f24ae5 (commit)
      from  ac4f9b467681e69eb785ce894a652aa8940602c9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 11dbbd972a75c8986cfe3166dcaef92c64f24ae5
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Jan 6 18:36:48 2013 +0100

    fix warning

diff --git a/src/common/include/config.php b/src/common/include/config.php
index 28129d1..8a5d212 100644
--- a/src/common/include/config.php
+++ b/src/common/include/config.php
@@ -3,6 +3,7 @@
  * FusionForge configuration functions
  *
  * Copyright 2009, Roland Mas
+ * Copyright 2013, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -104,22 +105,24 @@ class FusionForgeConfig {
 		$this->settings[$section][$var] = $value ;
 	}
 
-	function read_config_file ($filename) {
-		if (getenv ('FUSIONFORGE_USE_PRE_51_CONFIG') == 'true') {
+	function read_config_file($filename) {
+		if (getenv('FUSIONFORGE_USE_PRE_51_CONFIG') == 'true') {
 			$fallback_only = true;
 		} else {
 			$fallback_only = false;
 		}
 
 		if (file_exists($filename) && is_readable($filename)) {
-			$sections = parse_ini_file ($filename, true) ;
+			$sections = parse_ini_file($filename, true);
 			if (is_array($sections)) {
 				foreach ($sections as $section => $options) {
-					foreach ($options as $var => $value) {
-						if ($fallback_only) {
-							$this->set_value($section,$var,$value);
-						} else {
-							$this->reset_value($section,$var,$value);
+					if (is_array($options)) {
+						foreach ($options as $var => $value) {
+							if ($fallback_only) {
+								$this->set_value($section, $var, $value);
+							} else {
+								$this->reset_value($section, $var, $value);
+							}
 						}
 					}
 				}

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/config.php |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list