Fixes: #2398 Fixed undeclared $error var