Merge pull request #6 from yuan-dian/fix/union-type-arginfo-escape

fix(gen_stub): use toVarEscapedName for union type ZEND_TYPE_INIT_CLASS
master
韩天峰 15 hours ago committed by GitHub
commit 4a9b918e7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      src/gen_stub.php

@ -2913,8 +2913,8 @@ abstract class VariableLike
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->num_types = $classTypeCount;\n";
foreach ($arginfoType->classTypes as $k => $classType) {
$escapedClassName = $classType->toEscapedName();
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$escapedClassName}, 0, 0);\n";
$varEscapedClassName = $classType->toVarEscapedName();
$code .= "\t{$variableLikeType}_{$variableLikeName}_type_list->types[$k] = (zend_type) ZEND_TYPE_INIT_CLASS({$variableLikeType}_{$variableLikeName}_class_{$varEscapedClassName}, 0, 0);\n";
}
$typeMaskCode = $this->type->toArginfoType()->toTypeMask();

Loading…
Cancel
Save