-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Description
API Platform version(s) affected: 2.5
Description
Mercure Publish fails if an expression is used which could return false:
The value of the "mercure" attribute of the "MyClass" resource class must be a boolean, an array of options or an expression returning this array, "boolean" given.'
How to reproduce
/**
* @ApiResource(
* mercure="object.mercure()"
* )
*/
class MyClass
{
[...]
private function mercure(){
return false;
}
}
Possible Solution
Maybe just move the if-clause in
if (false === $options) { |
if (\is_string($options)) { |
stephanvierkant
Metadata
Metadata
Assignees
Labels
No labels