Skip to content

Remove Warning for array_key_exists#468

Merged
Landerstraeten merged 2 commits intophpro:masterfrom
Kanti:patch-1
Feb 16, 2018
Merged

Remove Warning for array_key_exists#468
Landerstraeten merged 2 commits intophpro:masterfrom
Kanti:patch-1

Conversation

@Kanti
Copy link
Contributor

@Kanti Kanti commented Feb 16, 2018

Q A
Branch master, 0.13.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Documented? no
Fixed tickets -

On install of grumphp without an grumphp.yml file I get this Warning:
Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/secure_login/vendor/phpro/grumphp/src/Configuration/Compiler/TaskCompilerPass.php on line 37

Wit my Proposed Changes this warning will be removed.

Remove Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/secure_login/vendor/phpro/grumphp/src/Configuration/Compiler/TaskCompilerPass.php on line 37

$tasksRegistered[] = $configKey;
if (!array_key_exists($configKey, $configuration)) {
if (!array_key_exists($configKey, $configuration?:[])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave this as it is and change line 22.
$configuration = $container->getParameter('tasks') ?: [];

@Kanti
Copy link
Contributor Author

Kanti commented Feb 16, 2018

@Landerstraeten I have changed it

@Landerstraeten Landerstraeten added this to the Version 0.14.0 milestone Feb 16, 2018
@Landerstraeten Landerstraeten merged commit a93b32c into phpro:master Feb 16, 2018
@Landerstraeten
Copy link
Contributor

Thank you @Kanti!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants