git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 450ae304 authored by mmn's avatar mmn

Plugins should be initialized with an empty array, not null

parent b6f5f58f
......@@ -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(),
......
......@@ -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.)
......
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment