Skip to content

Commit 69f51b7

Browse files
committed
Do not try to parse declaring class' source code
See #259 (comment)
1 parent a89c62e commit 69f51b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/php/lang/reflect/Parameter.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ public function getDefaultValue() {
171171

172172
$value= $this->_reflect->getDefaultValue();
173173
if (null === $value) {
174-
$details= XPClass::detailsForMethod($this->_reflect->getDeclaringClass(), $this->_details[1]);
175-
return $details[DETAIL_TARGET_ANNO]['$'.$this->_reflect->getName()]['default'] ?? null;
174+
$class= strtr($this->_reflect->getDeclaringClass()->getName(), '\\', '.');
175+
return \xp::$meta[$class][1][$this->_details[1]][DETAIL_TARGET_ANNO]['$'.$this->_reflect->getName()]['default'] ?? null;
176176
}
177177
return $value;
178178
}

0 commit comments

Comments
 (0)