Merge pull request #83 from creative-commoners/pulls/master/restore-php-5.6-support

BUG Restoring PHP5.6 support
This commit is contained in:
Garion Herman 2019-10-18 18:36:47 +13:00 committed by GitHub
commit 444d1aa14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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
@ -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

View File

@ -905,11 +905,11 @@ class RestfulServer extends Controller
* @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];
}
}