mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Fix constant references inside parameter default values when generating the manual
This commit is contained in:
@@ -2184,7 +2184,7 @@ OUPUT_EXAMPLE
|
||||
$defaultValue = $arg->getDefaultValueAsMethodSynopsisString();
|
||||
if ($defaultValue !== null) {
|
||||
$initializer = $doc->createElement('initializer');
|
||||
if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $defaultValue)) {
|
||||
if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9\:\\\\]*$/', $defaultValue)) {
|
||||
$constant = $doc->createElement('constant', $defaultValue);
|
||||
$initializer->appendChild($constant);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user