1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00

Fix zend_register_internal_class_ex alias generation (#8091)

This wouldn't work for creating aliases in a namespace.

It would create the class alias "MyNS_ClassName" instead of
"MyNS\\ClassName"
This commit is contained in:
Tyson Andre
2022-02-14 17:58:26 -05:00
committed by GitHub
parent 7add0da996
commit 0fab520ded
+1 -1
View File
@@ -1748,7 +1748,7 @@ class ClassInfo {
}
if ($this->alias) {
$code .= "\tzend_register_class_alias(\"" . str_replace("\\", "_", $this->alias) . "\", class_entry);\n";
$code .= "\tzend_register_class_alias(\"" . str_replace("\\", "\\\\", $this->alias) . "\", class_entry);\n";
}
foreach ($this->enumCaseInfos as $enumCase) {