Fix deprecation notice on PHP 8.1

This commit is contained in:
Toby Zerner 2022-06-21 14:58:38 +09:30
parent 7cab9545b4
commit 07e80965a4
No known key found for this signature in database
GPG Key ID: 9F2272AAFC4824D9
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.0] - 2022-06-21 ## [0.2.0] - 2022-06-21
### Fixed ### Fixed
- Fix `EloquentAdapter::filterByIds()` getting key name from query model instead of adapter model - Fix `EloquentAdapter::filterByIds()` getting key name from query model instead of adapter model
- Fix deprecation notice on PHP 8.1
## [0.2.0-beta.6] - 2022-04-22 ## [0.2.0-beta.6] - 2022-04-22
### Changed ### Changed

View File

@ -315,7 +315,7 @@ final class JsonApi implements RequestHandlerInterface
*/ */
public function stripBasePath(string $path): string public function stripBasePath(string $path): string
{ {
$basePath = parse_url($this->basePath, PHP_URL_PATH); $basePath = parse_url($this->basePath, PHP_URL_PATH) ?: '';
$len = strlen($basePath); $len = strlen($basePath);