]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Plugins should be initialized with an empty array, not null
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 19 Nov 2013 12:50:49 +0000 (13:50 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 19 Nov 2013 12:52:41 +0000 (13:52 +0100)
lib/default.php
lib/siteprofile.php
lib/statusnet.php

index 005a3683d815d1009775b4d3fd519c059731150d..dcdd58478c0d9b07d2ecc24e4b4f0f101694bd21 100644 (file)
@@ -293,9 +293,9 @@ $default =
         array('disabled' => true),
         'plugins' =>
         array('core' => array(
-                            'AuthCrypt' => null,
-                            'LRDD' => null,
-                            'StrictTransportSecurity' => null,
+                            'AuthCrypt' => array(),
+                            'LRDD' => array(),
+                            'StrictTransportSecurity' => array(),
                         ),
               'default' => array(
                             'Activity' => array(),
index 087dca48587759fef3e68d6e26023131384b7044..ae32acdf768c5dc8344e1bfff181f62d3dc67c4e 100644 (file)
@@ -110,10 +110,10 @@ class PublicSite extends SiteProfileSettings
             'plugins' => array(
                 'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'Directory'               => null,
-                    'ExtendedProfile'         => null,
-                    'OStatus'                 => null,
-                    'WebFinger'               => null,
+                    'Directory'               => array(),
+                    'ExtendedProfile'         => array(),
+                    'OStatus'                 => array(),
+                    'WebFinger'               => array(),
                 ))
             ),
             'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
@@ -146,10 +146,10 @@ class PrivateSite extends SiteProfileSettings
             'plugins' => array(
                 'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'Directory'               => null,
-                    'ExtendedProfile'         => null,
-                    'EmailRegistration'       => null,
-                    'MobileProfile'           => null,
+                    'Directory'               => array(),
+                    'ExtendedProfile'         => array(),
+                    'EmailRegistration'       => array(),
+                    'MobileProfile'           => array(),
                 ))
              ),
             'profile'       => array('delete' => 'true'),
@@ -197,9 +197,9 @@ class CommunitySite extends SiteProfileSettings
             'plugins' => array(
                 'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'Directory'               => null,
-                    'OStatus'                 => null,
-                    'WebFinger'               => null,
+                    'Directory'               => array(),
+                    'OStatus'                 => array(),
+                    'WebFinger'               => array(),
                 ))
             ),
             'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
@@ -232,11 +232,11 @@ class SingleuserSite extends SiteProfileSettings
             'plugins' => array(
                 'core'    => self::corePlugins(),
                 'default' => array_merge(self::defaultPlugins(), array(
-                    'MobileProfile'           => null,
-                    'OStatus'                 => null,
-                    'TwitterBridge'           => null,
-                    'FacebookBridge'          => null,
-                    'WebFinger'               => null,
+                    'MobileProfile'           => array(),
+                    'OStatus'                 => array(),
+                    'TwitterBridge'           => array(),
+                    'FacebookBridge'          => array(),
+                    'WebFinger'               => array(),
                 ))
             ),
             'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
index e596dd96d13a07d2979f565658b019567b1a2f7f..9041a556cc3912fee47fb97b39212e1a9672c11a 100644 (file)
@@ -205,6 +205,8 @@ class StatusNet
                 continue;
             }
 
+            // TODO: We should be able to avoid this is_null and assume $params
+            // is an array, since that's how it is typed in addPlugin
             if (is_null($params)) {
                 self::addPlugin($name);
             } else if (is_array($params)) {