1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 07:36:32 +02:00

Admin-UI: Removed PHP warnings while using inline editing.

This commit is contained in:
Cameron
2015-01-16 17:28:37 -08:00
parent 3237417b85
commit 02855a384f

View File

@@ -2730,11 +2730,14 @@ class e_form
private function renderInline($dbField, $pid, $fieldName, $curVal, $linkText, $type='text', $array=null) private function renderInline($dbField, $pid, $fieldName, $curVal, $linkText, $type='text', $array=null)
{ {
$jsonArray = array(); $jsonArray = array();
foreach($array as $k=>$v)
if(!empty($array))
{ {
$jsonArray[$k] = str_replace("'", "`", $v); foreach($array as $k=>$v)
{
$jsonArray[$k] = str_replace("'", "`", $v);
}
} }
$source = str_replace('"',"'",json_encode($jsonArray, JSON_FORCE_OBJECT)); // SecretR - force object, fix number of bugs $source = str_replace('"',"'",json_encode($jsonArray, JSON_FORCE_OBJECT)); // SecretR - force object, fix number of bugs