Closed devprofession closed 5 years ago
@devprofession thanks for reporting, will get it fixed.
I just wanted to throw my support behind this one. Every morning I wake up to Rollbar.com errors hitting their limit because of this issue.
I've submitted PR #619 to fix this issue. Are there any releases planned in the near future?
Thanks!
Can you share a specifc comment that causes this issue? it will help in debugging!
@squatto thanks for your efforts to fix this
Can you try the following fix and confirm that resolves the issue and does not create any new issue
Change the following on Line 276
on CommentParser.php
} else {
if (!is_string($value) && isset($value[self::$embeddedDataName])
&& isset($data[$param][self::$embeddedDataName])
) {
$value[self::$embeddedDataName]
+= $data[$param][self::$embeddedDataName];
}
$data[$param] = $value + $data[$param];
}
To the following
} elseif (!is_string($value) && isset($value[self::$embeddedDataName]) && isset($data[$param][self::$embeddedDataName])) {
$value[self::$embeddedDataName] += $data[$param][self::$embeddedDataName];
$data[$param] = $value + $data[$param];
}
@devprofession can you try the above fix?
I too had the issue. After applying the above change, the warning is no longer appearing.
Btw, you can replicate the issue by enabling rate limiting, and using the following doc block for the handler class. The warning starts appearing once the rate limit is crossed.
/**
* Test Class
*
* @abc opt1 900
* @abc opt2 300
*/
with 3.0.0 Restler
Warning: A non-numeric value encountered in .../vendor/luracast/restler/vendor/Luracast/Restler/CommentParser.php on line 283
You can replace the plus with dot, and the warnings disappeared.