From d6f51c5aa53d665f62ebc28870c53698896402f7 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Sat, 21 Jun 2014 14:37:42 -0400 Subject: [PATCH] Don't allow some E_NOTICE messages to end up in the LocalSettings.php There is probably a better, more comprehensive way to produce a LocalSettings.php file so that E_STRICT and E_NOTICE errors don't end up in the file, or to notify users that there is a problem with the generated file, at least. This only attempts to address those issues reported as a result of c978cee8562f018dab158b41e15266fcf873bf1b. Bug: 66922 Change-Id: I0fe70446d9fe23aed2a147e20e5ff3851371726d --- includes/installer/LocalSettingsGenerator.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 5e89ca4aa9..3c8a5b1d40 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -221,9 +221,12 @@ class LocalSettingsGenerator { wfBoolToStr( $perm ) . ";\n"; } } - if ( $this->groupPermissions['*']['edit'] === false - && $this->groupPermissions['*']['createaccount'] === false - && $this->groupPermissions['*']['read'] !== false + if ( ( isset( $this->groupPermissions['*']['edit'] ) && + $this->groupPermissions['*']['edit'] === false ) + && ( isset( $this->groupPermissions['*']['createaccount'] ) && + $this->groupPermissions['*']['createaccount'] === false ) + && ( isset( $this->groupPermissions['*']['read'] ) && + $this->groupPermissions['*']['read'] !== false ) ) { $noFollow = "\n# Set \$wgNoFollowLinks to true if you open up your wiki to editing by\n" . "# the general public and wish to apply nofollow to external links as a\n" -- 2.20.1