Hello,
We get from time to time the warning
Warning: fprintf(): Too few arguments in /path/to/project/vendor/corneltek/cliframework/src/Logger.php on line 183
Because the message getting logged contains %, in our case, an URL encoded provided by the service we're calling.
A quick fix is to escape % :
fprintf(STDERR, str_replace('%', '%%', $this->formatter->format($msg , $style)) . PHP_EOL);
|
fprintf(STDERR, $this->formatter->format($msg, $style) . PHP_EOL); |
I'm not sure where to point a fix, if the formatter should be involved or not, although I'm convinced the fprintf without additional arguments should escape %.
Thank you for your help.
Hello,
We get from time to time the warning
Because the message getting logged contains
%, in our case, an URL encoded provided by the service we're calling.A quick fix is to escape
%:CLIFramework/src/Logger.php
Line 188 in 5d7c470
I'm not sure where to point a fix, if the formatter should be involved or not, although I'm convinced the
fprintfwithout additional arguments should escape%.Thank you for your help.