Upgrade to 3.3.0
This commit is contained in:
@@ -8,6 +8,7 @@ use Kirby\Exception\NotFoundException;
|
||||
use Kirby\Http\Response;
|
||||
use Kirby\Http\Router;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Toolkit\Pagination;
|
||||
use Kirby\Toolkit\Properties;
|
||||
use Kirby\Toolkit\Str;
|
||||
use Throwable;
|
||||
@@ -38,7 +39,7 @@ class Api
|
||||
/**
|
||||
* Debugging flag
|
||||
*
|
||||
* @var boolean
|
||||
* @var bool
|
||||
*/
|
||||
protected $debug = false;
|
||||
|
||||
@@ -200,8 +201,16 @@ class Api
|
||||
}
|
||||
}
|
||||
|
||||
// don't throw pagination errors if pagination
|
||||
// page is out of bounds
|
||||
$validate = Pagination::$validate;
|
||||
Pagination::$validate = false;
|
||||
|
||||
$output = $this->route->action()->call($this, ...$this->route->arguments());
|
||||
|
||||
// restore old pagination validation mode
|
||||
Pagination::$validate = $validate;
|
||||
|
||||
if (is_object($output) === true && is_a($output, 'Kirby\\Http\\Response') !== true) {
|
||||
return $this->resolve($output)->toResponse();
|
||||
}
|
||||
@@ -268,7 +277,7 @@ class Api
|
||||
/**
|
||||
* Returns the debugging flag
|
||||
*
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function debug(): bool
|
||||
{
|
||||
@@ -279,7 +288,7 @@ class Api
|
||||
* Checks if injected data exists for the given key
|
||||
*
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
* @return bool
|
||||
*/
|
||||
public function hasData(string $key): bool
|
||||
{
|
||||
@@ -489,7 +498,7 @@ class Api
|
||||
/**
|
||||
* Setter for the debug flag
|
||||
*
|
||||
* @param boolean $debug
|
||||
* @param bool $debug
|
||||
* @return self
|
||||
*/
|
||||
protected function setDebug(bool $debug = false)
|
||||
@@ -693,7 +702,7 @@ class Api
|
||||
* Upload helper method
|
||||
*
|
||||
* @param Closure $callback
|
||||
* @param boolean $single
|
||||
* @param bool $single
|
||||
* @return array
|
||||
*
|
||||
* @throws Exception If request has no files
|
||||
|
Reference in New Issue
Block a user