kaltura / moodle_plugin

8 stars 37 forks source link

Bad function parameter definition #387

Closed bobopinna closed 1 year ago

bobopinna commented 1 year ago

https://github.com/kaltura/moodle_plugin/blob/7ebc9b718dce4ad89d8f0388fb421f4efcc99559/local/kalturamediagallery/lib.php#L117 In function isNodeNotEmpty the parameter $node is defined as navigation_node but the function tests if $node value is false. The PHP function parameter validation throw an exception when false value is passed to it.

Probably is better to not set the parameter type in function definition and check for the type inside the function.

HTH,

bobopinna commented 1 year ago

Sorry for duplicated issue #363