Skip to content

Commit fc40c3f

Browse files
committed
Merge pull request #30 from mbed67/iconv_issue
Added check if iconv is loaded
2 parents 552ad3e + b11da12 commit fc40c3f

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)