Browse Source

Bug JSON alternative

Suite https://github.com/marienfressinaud/FreshRSS/issues/306
Alexandre Alapetite 12 years ago
parent
commit
c9c068115d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      lib/lib_rss.php
  2. 1 1
      public/install.php

+ 2 - 2
lib/lib_rss.php

@@ -3,7 +3,7 @@ if (!function_exists('json_decode')) {
 	require_once('JSON.php');
 	function json_decode($var) {
 		$JSON = new Services_JSON;
-		return $JSON->decode($var);
+		return (array)($JSON->decode($var));
 	}
 }
 
@@ -11,7 +11,7 @@ if (!function_exists('json_encode')) {
 	require_once('JSON.php');
 	function json_encode($var) {
 		$JSON = new Services_JSON;
-		return $JSON->encode($var);
+		return $JSON->encodeUnsafe($var);
 	}
 }
 

+ 1 - 1
public/install.php

@@ -599,7 +599,7 @@ function printStep3 () {
 		<div class="form-group">
 			<label class="group-name" for="base"><?php echo _t ('bdd'); ?></label>
 			<div class="group-controls">
-				<input type="text" id="base" name="base" maxlength="64" value="<?php echo isset ($_SESSION['bd_name']) ? $_SESSION['bd_name'] : ''; ?>" placeholder="<?php echo _t ('freshrss'); ?>" />
+				<input type="text" id="base" name="base" maxlength="64" value="<?php echo isset ($_SESSION['bd_name']) ? $_SESSION['bd_name'] : ''; ?>" placeholder="freshrss" />
 			</div>
 		</div>