monolog-mysql
monolog-mysql copied to clipboard
SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
The error below has started to occur when running PHPUnit tests in Laravel (5.3.*) . I know this error has been mentioned before but this has only just appeared within the last 48 hours after upgrading from 1.0.3 to 1,0.4. I'm not using Silex or its Monolog Service Provider.
1) ConsoleHelperTest::testReportSuccess
Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
C:\wamp\www\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:93
C:\wamp\www\vendor\wazaari\monolog-mysql\src\MySQLHandler\MySQLHandler.php:214
C:\wamp\www\vendor\monolog\monolog\src\Monolog\Handler\AbstractProcessingHandler.php:37
C:\wamp\www\vendor\monolog\monolog\src\Monolog\Logger.php:337
C:\wamp\www\packages\logging\src\Logging.php:190
C:\wamp\www\packages\logging\src\Logging.php:93
C:\wamp\www\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:237
C:\wamp\www\app\Traits\ConsoleHelper.php:20
C:\wamp\www\app\Traits\ConsoleHelper.php:20
C:\wamp\www\tests\Traits\ConsoleHelperTest.php:24
Caused by
PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
I do have a custom wrapper to allow extra parameters to be passed into the MySQL logging table, and it's been working just fine for the last 18 months or so.
Rolling back to 1.0.3 fixes this.
Looks like this is kind of related to #12, as you already said. Thanks for reporting, I will look into it soon. For now, stay on 1.0.3.
OK, ta v. much!
Hello @ssssteve, since this issue is from 2017 I assume you've found a solution or the question is no longer relevant. I'll close it in terms of housekeeping.