I posting this here because, although I have already found a solution, it might be worth to know whether some other people has faced the same problem and can provide a better explanation for this. The issue is as follows:
A function receives an array as parameter, and depending of the content of a given key-value pair, does one action or another:
if ($info['password'] != "") {
// action 1
}else{
// action 2
}
It also returns the value of this key at the end:
return array("user" => $user, "pwd" => $info['password']);
Therefore, if $info['password'] is not set, it should return this error:
ContextErrorException. Undefined index: password
This happens when I run my application locally in development mode, using app/console server:run, but it gets masked when deploying in production server or also when running server:run --env=prod: It simply does not show any error nor warning. Is this an expected behaviour? Has this something to do with Symfony configuration or is it a php.ini related issue?
It makes sense from a practical point of view, the application returns an empty field but it does not crash and the user does not realize of the bug, but it might be very bad when trying to debug the application.