From d6e56847b966754c7c9714d9331031a2c8bf3049 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Sun, 18 Jan 2004 21:57:12 +0000 Subject: Prevent Php warnings if some config variables are NULL git-svn-id: http://piwigo.org/svn/branches/release-1_3@294 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/config.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/config.inc.php b/include/config.inc.php index 772d1a38e..e067c7905 100644 --- a/include/config.inc.php +++ b/include/config.inc.php @@ -79,12 +79,13 @@ $row = mysql_fetch_array( mysql_query( $query ) ); // affectation of each field of the table "config" to an information of the // array $conf. foreach ( $infos as $info ) { - $conf[$info] = $row[$info]; + if ( isset( $row[$info] ) ) $conf[$info] = $row[$info]; + else $conf[$info] = ''; // If the field is true or false, the variable is transformed into a boolean // value. - if ( $row[$info] == 'true' or $row[$info] == 'false' ) + if ( $conf[$info] == 'true' or $conf[$info] == 'false' ) { - $conf[$info] = get_boolean( $row[$info] ); + $conf[$info] = get_boolean( $conf[$info] ); } } ?> \ No newline at end of file -- cgit v1.2.3