Skip to content

Conversation

@AdrienClairembault
Copy link
Contributor

@AdrienClairembault AdrienClairembault commented Jun 30, 2021

Fix this notice:

PHP Notice: Trying to access array offset on value of type null

This is caused by the result of array_shift($found); being null.

https://www.php.net/manual/en/function.array-shift.php

Returns the shifted value, or null if array is empty or is not an array.

-> the following condition should take into account that the variable may be null.

@cedric-anne cedric-anne changed the title Fix php notice Fix php notice when a container is disabled for all profiles Jul 12, 2021
@cedric-anne cedric-anne added this to the 1.12.7 milestone Jul 12, 2021
@cedric-anne cedric-anne merged commit 6a5dcd8 into pluginsGLPI:develop Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants