1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-21 00:31:29 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Michaël Jacobs
fa8049c5b6 Fix warning on null query parameter (#722)
* Check if hljs has language (#699)

* Fix PHP 8 warning in `TracedStatement::getSqlWithParameters()` when null was bound

Since PHP 8.0, [built-in functions like `strtr()` will emit a warning when passing `null` to required string parameters](docs):

```
strtr(): Passing null to parameter #1 ($string) of type string is deprecated
```

This can happen when e.g. binding `PDO::PARAM_NULL` to your query.

[docs]: https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.core.null-not-nullable-internal

---------

Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
2025-02-07 20:05:01 +01:00
Tadhg Boyle
fd43dfb084 Fix random instances of SQL queries having params repeated (#505)
* Fix random instances of SQL queries having params repeated

* Add test
2022-10-31 14:26:03 +01:00
Thiago Guimarães
4048ff47ed Bug fix repead params sql (#387)
* Bug fix repead params sql

* Fix array

* Fix array
2018-05-19 19:41:13 +02:00
Noah Heck
3f311533b5 Traced statement interpolation fixes (#381)
* Prevent back reference issues in TracedStatement

* Prevent substring replacement

If a previously replaced value in the query string contains the placeholder
for a future replacement, the string inside was being replaced
Also, PHP allows the bindParameter syntax to omit the leading ':', so we
test to make sure it's there and add it if not
2018-04-16 21:36:29 +02:00
Thiago Guimarães
3e3dad6f9a Bugfix getSqlWithParams ReplacementParamsQuery (#351)
* Bugfix getSqlWithParams ReplacementParamsQuery

* backward compatibility
2017-08-14 10:46:50 +02:00