Changeset 3082 for trunk/php/lib/function.mtvar.php
- Timestamp:
- 10/03/08 01:07:01 (14 months ago)
- Files:
-
- 1 modified
-
trunk/php/lib/function.mtvar.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/php/lib/function.mtvar.php
r2873 r3082 111 111 } 112 112 } 113 else { 114 if (array_key_exists('to_json', $args) && $args['to_json']) { 115 if (function_exists('json_encode')) { 116 $return_val = json_encode($value); 117 } else { 118 $return_val = ''; 119 } 120 } 121 } 113 122 } 114 123 elseif (is_array($value)) { … … 140 149 } 141 150 else { 142 if (!array_key_exists('to_json', $args) && $args['to_json']) { 143 $glue = $args['glue']; 144 if (!isset($glue)) 145 $glue = ''; 146 $return_val = implode($glue, $value); 151 if (array_key_exists('to_json', $args) && $args['to_json']) { 152 if (function_exists('json_encode')) { 153 $return_val = json_encode($value); 154 } else { 155 $return_val = ''; 156 } 147 157 } 148 158 }
