Skip to content

Commit

Permalink
fixes FASTCGI_UNEXPECTED_EXIT (error 0xff) in FastCGI/IIS for PHP5.6.…
Browse files Browse the repository at this point in the history
…x 64bit
  • Loading branch information
yurii-github committed Jan 3, 2015
1 parent 2140942 commit e8b8a40
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions inc/plugincontroller.class.php
Expand Up @@ -309,25 +309,30 @@ protected function loadConfig() {
*/
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;
}
Expand Down

0 comments on commit e8b8a40

Please sign in to comment.