From 1e37b2f870210dfaccab1952c731ac79675c3cba Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 20 Nov 2014 12:00:26 +0100 Subject: [PATCH] getFData : try to catch error casting data to string --- public_html/includes/functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public_html/includes/functions.php b/public_html/includes/functions.php index 3baef41c..5f3f7f3a 100644 --- a/public_html/includes/functions.php +++ b/public_html/includes/functions.php @@ -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