getFData : try to catch error casting data to string
authorBenjamin Renard <brenard@easter-eggs.com>
Thu, 20 Nov 2014 11:00:26 +0000 (12:00 +0100)
committerBenjamin Renard <brenard@easter-eggs.com>
Thu, 20 Nov 2014 11:00:26 +0000 (12:00 +0100)
public_html/includes/functions.php

index 3baef41..5f3f7f3 100644 (file)
@@ -168,7 +168,12 @@ function _getFData_extractAndModify($data,$ch) {
     $val=substr((string)$data,$s,$l);
   }
   else {
-    $val=(string)$data;
+    try {
+      $val=strval($data);
+    }
+    catch (Exception $e) {
+      $val=_('[not string value]');
+    }
   }
 
   # Without Accent