Skip to content

Commit b11da12

Browse files
committed
Added check if iconv is loaded
1 parent 552ad3e commit b11da12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/phpDocumentor/Reflection/FileReflector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function __construct($file, $validate = false, $encoding = 'utf-8')
138138
$this->contents = file_get_contents($file);
139139
$this->context = new Context();
140140

141-
if (strtolower($encoding) !== 'utf-8') {
141+
if (strtolower($encoding) !== 'utf-8' && extension_loaded('iconv')) {
142142
$this->contents = iconv(
143143
strtolower($encoding),
144144
'utf-8//IGNORE//TRANSLIT',

0 commit comments

Comments
 (0)