mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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
This commit is contained in:
@@ -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] );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user