Closed moises-cobrowser closed 6 years ago
After upgrading all the packages to the latest version
monolog/monolog 1.22.1 Sends your logs to files, sockets, inboxes, databases and various web services
pimple/pimple v3.0.2 Pimple, a simple Dependency Injection Container
psr/log 1.0.2 Common interface for logging libraries
silex/silex v2.1.0 The PHP micro-framework based on the Symfony Components
symfony/debug v3.3.0 Symfony Debug Component
symfony/event-dispatcher v3.3.0 Symfony EventDispatcher Component
symfony/http-foundation v3.3.0 Symfony HttpFoundation Component
symfony/http-kernel v3.3.0 Symfony HttpKernel Component
symfony/polyfill-mbstring v1.3.0 Symfony polyfill for the Mbstring extension
symfony/routing v3.3.0 Symfony Routing Component
I'm still having the same issue it's interpreting the $code
parameter as variadic, could someone explain how is that possible ? Becasue the $code
parameter is just a simple String/Int.
public function update ( Request $request, Application $app, $code )
{
...
}
Not sure how this is possible, but not probably not related to Silex. Closing for now.
Hello,
There's something I'd like to share with you to see if someone can bring me some ideas about how to solve this issue.
When I POST/PUT and sometimes even doing GETs to my endpoints I'm getting this error:
app.CRITICAL: InvalidArgumentException: The action argument "...$code" is required to be an array, the request attribute "code" contains a type of "string" instead. (uncaught exception) at /vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php line 41 {"exception":"[object] (InvalidArgumentException(code: 0): The action argument \"...$code\" is required to be an array, the request attribute \"code\" contains a type of \"string\" instead. at /vendor/symfony/http-kernel/Controller/ArgumentResolver/VariadicValueResolver.php:41)"} []
Recently I migrated my app to a new server and in this server I have ModSecurity enabled. I'm not sure if ModSecurity can cause any issues with Silex I can see something in my ModSecurity audit log, however I don't see any errors my webserver error.log reported by ModSecurity. I've even tried without ModSecurity and still same issue.
Is someone experiencing this issue ? Any Idea about how to solve it ?
Silex app routes configuration:
Silex EmployeesCtrl methods:
Silex logs:
Silex versions:
mod_security audit log