X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Futils%2FAutoloadGenerator.php;h=54a86775f8b020194e00b3f52d6688e70a4dbe03;hb=3458091bfe2c9602a4ee62724626a884d7e090bf;hp=55e228afcd3f917836113a642aec08c49b0ca1ce;hpb=704d04678318ebd329916e67e3a266db1a7b128e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/AutoloadGenerator.php b/includes/utils/AutoloadGenerator.php index 55e228afcd..54a86775f8 100644 --- a/includes/utils/AutoloadGenerator.php +++ b/includes/utils/AutoloadGenerator.php @@ -152,7 +152,7 @@ class AutoloadGenerator { ksort( $json[$key] ); // Return the whole JSON file - return FormatJson::encode( $json, true ) . "\n"; + return FormatJson::encode( $json, "\t", FormatJson::ALL_OK ) . "\n"; } /** @@ -212,7 +212,6 @@ global \${$this->variableName}; ]; EOD; - } /** @@ -432,6 +431,15 @@ class ClassCollector { $this->classes[] = $this->alias['name']; $this->alias = null; $this->startToken = null; + } elseif ( !is_array( $token ) || ( + $token[0] !== T_STRING && + $token[0] !== T_DOUBLE_COLON && + $token[0] !== T_CLASS && + $token[0] !== T_WHITESPACE + ) ) { + // Ignore this call to class_alias() - compat/Timestamp.php + $this->alias = null; + $this->startToken = null; } } break;