Under certain conditions (no "local" plugins being loaded - whatever that might mean if you're loggin in as admin), global plugins don't work. This is fatal when (eg.) a global plugin is supposed to change the Authentication Method, which is the case for me.
This is due to a bug in (some) PHP (versions), which think(s) array_merge(NULL,x) == NULL, not == x.
Solution:
-
src/lib/wp-settings.php
| old |
new |
|
| 196 | 196 | require(ABSPATH . '/my-hacks.php'); |
|---|
| 197 | 197 | } |
|---|
| 198 | 198 | |
|---|
| 199 | | if ( get_settings('active_plugins') || get_settings('active_system_plugins')) { |
|---|
| 200 | | $current_plugins = array_merge(get_settings('active_plugins'), get_settings('active_system_plugins')); |
|---|
| | 199 | $plugins1=get_settings('active_plugins'); |
|---|
| | 200 | if (!$plugins1) |
|---|
| | 201 | $plugins1=array(); |
|---|
| | 202 | |
|---|
| | 203 | $plugins2=get_settings('active_system_plugins'); |
|---|
| | 204 | if (!$plugins2) |
|---|
| | 205 | $plugins2=array(); |
|---|
| | 206 | |
|---|
| | 207 | if ( $plugins1 || $plugins2) { |
|---|
| | 208 | $current_plugins = array_merge($plugins1, $plugins2); |
|---|
| 201 | 209 | if ( is_array($current_plugins) ) { |
|---|
| 202 | 210 | foreach ($current_plugins as $plugin) { |
|---|
| 203 | 211 | if ('' != $plugin && file_exists(ABSPATH |