diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2021-02-06 14:13:22 -0500 |
---|---|---|
committer | Tyson Andre <tysonandre775@hotmail.com> | 2021-02-06 14:17:14 -0500 |
commit | 5e06dad411d895c6605115bd4ef4c86f3b2a0041 (patch) | |
tree | d84b750e303c2b4b80ae342884924b2732faacfa /build | |
parent | f23bfc4b43ecee99c81171116db9d92e61b6492d (diff) | |
download | php-git-5e06dad411d895c6605115bd4ef4c86f3b2a0041.tar.gz |
Properly render 2+ namespaces functions in build/gen_stub.php
Affects ZEND_NS_FE
Add test cases of the global function
Backported to php 8.0 from GH-6664
Diffstat (limited to 'build')
-rwxr-xr-x | build/gen_stub.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/build/gen_stub.php b/build/gen_stub.php index 6d1ae99ebc..d84851091b 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -793,9 +793,10 @@ class FuncInfo { } if ($namespace) { + // Render A\B as "A\\B" in C strings for namespaces return sprintf( "\tZEND_NS_FE(\"%s\", %s, %s)\n", - $namespace, $declarationName, $this->getArgInfoName()); + addslashes($namespace), $declarationName, $this->getArgInfoName()); } else { return sprintf("\tZEND_FE(%s, %s)\n", $declarationName, $this->getArgInfoName()); } |