Using a default install on Ubuntu 18.04, I’m seeing errors like the below if user registration fails. The simplest way to reproduce is to try to register two accounts with the same email address.
[error] 11029#11029: *165 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: user in /srv/www/<redacted>/app/sprinkles/account/src/Controller/AccountController.php on line 926" while reading response header from upstream, client: <redacted>, server: <redacted>, request: "POST /account/register HTTP/1.1"
Looking at the PHP code (I’m a C programmer, not a PHP expert) should the block that uses $user be inside the try block just above?