Hallo,
mein error_log meldet folgende Fehlermeldung:
[08-Nov-2015 23:23:51 UTC] PHP Warning: trim() expects parameter 1 to be string, array given in /xxx/xxx/xxx/libraries/vendor/joomla/registry/src/Format/Json.php on line 50
weiß leider nicht was da nicht stimmt, da ich mit php nicht so "befreundet" bin.
Hier die Json.php
PHP
<?php
/**
* Part of the Joomla Framework Registry Package
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Registry\Format;
use Joomla\Registry\AbstractRegistryFormat;
use Joomla\String\String;
/**
* JSON format handler for Registry.
*
* @since 1.0
*/
class Json extends AbstractRegistryFormat
{
/**
* Converts an object into a JSON formatted string.
*
* @param object $object Data source object.
* @param array $options Options used by the formatter.
*
* @return string JSON formatted string.
*
* @since 1.0
*/
public function objectToString($object, $options = array())
{
return String::unicode_to_utf8(json_encode($object));
}
/**
* Parse a JSON formatted string and convert it into an object.
*
* If the string is not in JSON format, this method will attempt to parse it as INI format.
*
* @param string $data JSON formatted string to convert.
* @param array $options Options used by the formatter.
*
* @return object Data object.
*
* @since 1.0
*/
public function stringToObject($data, array $options = array('processSections' => false))
{
$data = trim($data);
if ((substr($data, 0, 1) != '{') && (substr($data, -1, 1) != '}'))
{
$ini = AbstractRegistryFormat::getInstance('Ini');
$obj = $ini->stringToObject($data, $options);
}
else
{
$obj = json_decode($data);
}
return $obj;
}
}
Alles anzeigen
Falls ich im falschen Forum geschrieben habe, entschuldige ich mich dafür und bitte um verschiebung.
Hoffe auf eine baldige hilfestellung.
Vielen Dank
LG
FlexMax