aboutsummaryrefslogtreecommitdiffstats
path: root/include/config.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-18 21:57:12 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-18 21:57:12 +0000
commitd6e56847b966754c7c9714d9331031a2c8bf3049 (patch)
tree218d1cb45149bd24c04cf41870f14c779be23354 /include/config.inc.php
parent7250f30ce760fe59be5f6fa4605b86291ca3a0ce (diff)
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
Diffstat (limited to '')
-rw-r--r--include/config.inc.php7
1 files 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