Upgrade to 3.6.0

This commit is contained in:
Bastian Allgeier
2021-11-16 14:53:37 +01:00
parent 7388fa4d24
commit 92b7a330fa
318 changed files with 20017 additions and 6878 deletions

View File

@@ -3,7 +3,7 @@
namespace Kirby\Data;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* The `Data` class provides readers and

View File

@@ -3,7 +3,7 @@
namespace Kirby\Data;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* Base handler abstract,

View File

@@ -34,7 +34,7 @@ class Json extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View File

@@ -4,7 +4,7 @@ namespace Kirby\Data;
use Kirby\Exception\BadMethodCallException;
use Kirby\Exception\Exception;
use Kirby\Toolkit\F;
use Kirby\Filesystem\F;
/**
* Reader and write of PHP files with data in a returned array
@@ -49,10 +49,10 @@ class PHP extends Handler
/**
* PHP strings shouldn't be decoded manually
*
* @param mixed $array
* @param mixed $string
* @return array
*/
public static function decode($array): array
public static function decode($string): array
{
throw new BadMethodCallException('The PHP::decode() method is not implemented');
}

View File

@@ -93,7 +93,7 @@ class Txt extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View File

@@ -35,7 +35,7 @@ class Xml extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}

View File

@@ -50,7 +50,7 @@ class Yaml extends Handler
*/
public static function decode($string): array
{
if ($string === null) {
if ($string === null || $string === '') {
return [];
}