Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Restoring PHP5.6 support #83

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ env:

matrix:
include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_TEST=1
- php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.1
Expand All @@ -17,7 +19,7 @@ matrix:
- php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
- php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.x-dev
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1

before_script:
# Init PHP
Expand Down
4 changes: 2 additions & 2 deletions src/RestfulServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -905,11 +905,11 @@ protected function getMember()
* @param HTTPRequest $request
* @return string
*/
protected function resolveClassName(HTTPRequest $request): string
protected function resolveClassName(HTTPRequest $request)
{
$className = $request->param('ClassName');
$aliases = self::config()->get('endpoint_aliases');

return $aliases[$className] ?? $this->unsanitiseClassName($className);
return empty($aliases[$className]) ? $this->unsanitiseClassName($className) : $aliases[$className];
robbieaverill marked this conversation as resolved.
Show resolved Hide resolved
}
}