]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/admin/ManageShaareController.php
Fix warning if the encoding retrieved from external headers is invalid
[github/shaarli/Shaarli.git] / application / front / controller / admin / ManageShaareController.php
index ca2da9b53b7edb4e545ba7b337f04138313ab3f3..ffb0dae430ca69ec2929b14a323add0f554d562e 100644 (file)
@@ -69,7 +69,7 @@ class ManageShaareController extends ShaarliAdminController
                         $retrieveDescription
                     )
                 );
-                if (! empty($title) && strtolower($charset) !== 'utf-8') {
+                if (! empty($title) && strtolower($charset) !== 'utf-8' && mb_check_encoding($charset)) {
                     $title = mb_convert_encoding($title, 'utf-8', $charset);
                 }
             }