BUG Restoring PHP5.6 support

This commit is contained in:
Maxime Rainville 2019-10-18 16:38:21 +13:00
parent b3acde80f6
commit ac0b263683
2 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,8 @@ env:
matrix: matrix:
include: include:
- php: 5.6
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPUNIT_TEST=1
- php: 7.1 - php: 7.1
env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1 env: DB=MYSQL RECIPE_VERSION=4.3.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
- php: 7.1 - php: 7.1
@ -17,7 +19,7 @@ matrix:
- php: 7.2 - php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1 env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
- php: 7.3 - php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.x-dev env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
before_script: before_script:
# Init PHP # Init PHP

View File

@ -905,11 +905,11 @@ class RestfulServer extends Controller
* @param HTTPRequest $request * @param HTTPRequest $request
* @return string * @return string
*/ */
protected function resolveClassName(HTTPRequest $request): string protected function resolveClassName(HTTPRequest $request)
{ {
$className = $request->param('ClassName'); $className = $request->param('ClassName');
$aliases = self::config()->get('endpoint_aliases'); $aliases = self::config()->get('endpoint_aliases');
return $aliases[$className] ?? $this->unsanitiseClassName($className); return empty($aliases[$className]) ? $this->unsanitiseClassName($className) : $aliases[$className];
} }
} }