From: Brion Vibber Date: Tue, 7 Sep 2004 08:25:35 +0000 (+0000) Subject: Use array_keys() rather than array_flip(), which fails for NULL values. X-Git-Tag: 1.5.0alpha1~2064 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=cbfdfb60dd6cee5bc37f8d6e98cf5cd8dbd20a8c;p=lhc%2Fweb%2Fwiklou.git Use array_keys() rather than array_flip(), which fails for NULL values. --- diff --git a/includes/Database.php b/includes/Database.php index a0e62f97df..21256c0fd4 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -932,7 +932,7 @@ class Database { $rows = array( $rows ); } - $sql = "REPLACE INTO $table (" . implode( ',', array_flip( $rows[0] ) ) .') VALUES '; + $sql = "REPLACE INTO $table (" . implode( ',', array_keys( $rows[0] ) ) .') VALUES '; $first = true; foreach ( $rows as $row ) { if ( $first ) {