Closed (fixed)
Project:
Config Pages
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2021 at 17:03 UTC
Updated:
10 Aug 2021 at 05:39 UTC
Jump to comment: Most recent
config_pages_config() can return NULL but the docblock does not acknowledge that.
When doing something like this:
if ($page = config_pages_config('foo')) {
// Do something with it
}
drupal-check is complaining:
If condition is always true.
The return type should be \Drupal\config_pages\Entity\ConfigPages|null.
I will submit a patch.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
prudloff commentedComment #4
shumer commented