Problem:
In description of function
* @return string|NULL
* Return the output of the rendered view or NULL if something failed in the
* process.
*/
public function render($display_id = NULL) { in views/includes/view.inc the type of the returned parameter is specified incorrectly. This is analyzed through the code analyzer Phan caught error of type PhanTypeExpectedObjectPropAccess in services_views module.
Phan tool reported SEVERITY_CRITICAL issue:
- PhanTypeExpectedObjectPropAccess. Function services_views_execute_view() in services_views/services_views.module: "Expected an object instance when accessing an instance property, but saw an expression $output[$index] with type string"
Steps to reproduce:
run Phan tool ('minimum_target_php_version' => '8.0')
Proposed resolution:
To add type 'array' for @return parameter in description.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-3276180-php8-compatibility.patch | 459 bytes | alena_stanul |
Comments
Comment #2
alena_stanul commentedComment #3
renatog commentedReally makes sense to me. Good catch
Comment #4
damienmckennaShort but sweet. Committed. Thank you.