diff options
author | Yurii Korotia <y.korotia@hotmail.com> | 2015-01-03 13:28:56 +0200 |
---|---|---|
committer | Yurii Korotia <y.korotia@hotmail.com> | 2015-01-03 13:28:56 +0200 |
commit | e8b8a4027e0150f75db5ab381b7fee4ed959ea2f (patch) | |
tree | cabaf1dbc78a0878c5c8020aa3315fce9e713509 | |
parent | 21409423073c733f0307b1ccd0ecc3e446cea4be (diff) | |
download | rpg-e8b8a4027e0150f75db5ab381b7fee4ed959ea2f.tar.gz rpg-e8b8a4027e0150f75db5ab381b7fee4ed959ea2f.tar.bz2 |
fixes FASTCGI_UNEXPECTED_EXIT (error 0xff) in FastCGI/IIS for PHP5.6.x 64bit
-rw-r--r-- | inc/plugincontroller.class.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index dfd4d0a29..f8ba58563 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -309,25 +309,30 @@ class Doku_Plugin_Controller { */ protected function _getListByType($type, $enabled) { $master_list = $enabled ? array_keys(array_filter($this->tmp_plugins)) : array_keys(array_filter($this->tmp_plugins,array($this,'negate'))); - $plugins = array(); + foreach ($master_list as $plugin) { + $dir = $this->get_directory($plugin); - if (@file_exists(DOKU_PLUGIN."$dir/$type.php")){ $plugins[] = $plugin; - } else { - if ($dp = @opendir(DOKU_PLUGIN."$dir/$type/")) { + continue; + } + + $dir2 = DOKU_PLUGIN."$dir/$type/"; + if (is_dir($dir2)) { + if ($dp = opendir($dir2)) { while (false !== ($component = readdir($dp))) { if (substr($component,0,1) == '.' || strtolower(substr($component, -4)) != ".php") continue; - if (is_file(DOKU_PLUGIN."$dir/$type/$component")) { + if (is_file($dir2.$component)) { $plugins[] = $plugin.'_'.substr($component, 0, -4); } } closedir($dp); } } - } + + }//foreach return $plugins; } |