Upgrade to 3.2.0

This commit is contained in:
Bastian Allgeier
2019-06-25 09:56:08 +02:00
parent 9e18cf635d
commit 9c89153d35
296 changed files with 14408 additions and 2504 deletions

View File

@@ -12,9 +12,9 @@ use Kirby\Toolkit\F;
*
* @package Kirby Data
* @author Bastian Allgeier <bastian@getkirby.com>
* @link http://getkirby.com
* @copyright Bastian Allgeier
* @license MIT
* @link https://getkirby.com
* @copyright Bastian Allgeier GmbH
* @license https://opensource.org/licenses/MIT
*/
abstract class Handler
{
@@ -45,7 +45,7 @@ abstract class Handler
*/
public static function read(string $file): array
{
if (file_exists($file) !== true) {
if (is_file($file) !== true) {
throw new Exception('The file "' . $file . '" does not exist');
}
@@ -53,11 +53,9 @@ abstract class Handler
}
/**
* Writes data to a file.
* The data handler is automatically chosen by
* the extension if not specified.
* Writes data to a file
*
* @param array $data
* @param array $data
* @return boolean
*/
public static function write(string $file = null, array $data = []): bool