Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 85e2f60

Browse files
committed
Merge branch 'hotfix/634'
Close #634
2 parents 28432b5 + c728710 commit 85e2f60

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All notable changes to this project will be documented in this file, in reverse
2222

2323
### Fixed
2424

25-
- Nothing.
25+
- [#634](https://github.com/zendframework/zend-expressive/pull/634) provides several minor performance and maintenance improvements.
2626

2727
## 3.1.0 - 2018-07-30
2828

src/Container/ApplicationConfigInjectionDelegator.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal
5454
}
5555

5656
$config = $container->get('config');
57-
if (! isset($config['routes']) && ! isset($config['middleware_pipeline'])) {
58-
return $application;
59-
}
6057

61-
self::injectPipelineFromConfig($application, (array) $config);
62-
self::injectRoutesFromConfig($application, (array) $config);
58+
if (! empty($config['middleware_pipeline'])) {
59+
self::injectPipelineFromConfig($application, (array) $config);
60+
}
61+
if (! empty($config['routes'])) {
62+
self::injectRoutesFromConfig($application, (array) $config);
63+
}
6364

6465
return $application;
6566
}
@@ -172,7 +173,7 @@ public static function injectPipelineFromConfig(Application $application, array
172173
*/
173174
public static function injectRoutesFromConfig(Application $application, array $config) : void
174175
{
175-
if (! isset($config['routes']) || ! is_array($config['routes'])) {
176+
if (empty($config['routes']) || ! is_array($config['routes'])) {
176177
return;
177178
}
178179

0 commit comments

Comments
 (0)