Correction extraction propriété en chaine de caractères

2.x 2.2.1
Julien Rosset 3 years ago
parent 648165a6ad
commit a01a6b49f5

@ -110,7 +110,7 @@ abstract class GenericConfig {
*/
public function getPropertyAsString (string $name, ?string $default = null): string {
$value = $this->getProperty($name, $default);
if (!is_string($value) || !is_object($value) || method_exists($value, '__ToString')) {
if (!is_string($value) && !is_object($value) && !method_exists($value, '__ToString')) {
throw new RangeException('The "' . $name . '" property is not a valid string : ' . $value);
}

Loading…
Cancel
Save