Don't allow some E_NOTICE messages to end up in the LocalSettings.php
authorMark A. Hershberger <mah@everybody.org>
Sat, 21 Jun 2014 18:37:42 +0000 (14:37 -0400)
committerMark A. Hershberger <mah@everybody.org>
Sat, 21 Jun 2014 18:37:42 +0000 (14:37 -0400)
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

index 5e89ca4..3c8a5b1 100644 (file)
@@ -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"