From 54b012a4710df34e419d82f892b52b2e2aa830a4 Mon Sep 17 00:00:00 2001 From: afilippov1985 Date: Wed, 7 Jun 2017 14:00:16 +0400 Subject: [PATCH] Fix PHP Notice when collation not set Fix PHP Notice when `collation` not set in config/database.php --- src/Illuminate/Database/Connectors/MySqlConnector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Connectors/MySqlConnector.php b/src/Illuminate/Database/Connectors/MySqlConnector.php index 8741fccb44d9..3b12b300ef75 100755 --- a/src/Illuminate/Database/Connectors/MySqlConnector.php +++ b/src/Illuminate/Database/Connectors/MySqlConnector.php @@ -65,7 +65,7 @@ protected function configureEncoding($connection, array $config) */ protected function getCollation(array $config) { - return ! is_null($config['collation']) ? " collate '{$config['collation']}'" : ''; + return isset($config['collation']) ? " collate '{$config['collation']}'" : ''; } /**