-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Describe the bug
When executing a query using the Laudis Neo4j PHP client, a TypeError is thrown due to an unexpected false value passed to the SummaryCounters constructor for the systemUpdates parameter. This issue occurs only in rare cases, when the Neo4j server returns false for the system-updates key in the summary statistics, whereas the constructor expects an int.
To Reproduce
Steps to reproduce the behavior:
- Run a query that triggers SummaryCounters creation, e.g., a MATCH or write query.
- Ensure the Neo4j server returns false for the system-updates key in summary statistics (you can inspect this with a debugger or log $stats).
- Observe the error being thrown when the client tries to instantiate SummaryCounters.
Expected behavior
The client should gracefully handle the case where system-updates is false, either by casting it to 0 or checking for its type. The result formatting should not throw a type error due to mismatched data from Neo4j.
Environment (please complete the following information):
- PHP version: 8.3.4
- laudis/neo4j-php-client: 3.0.6
- neo4j: v4 or v5
- Ubuntu 22.04.4 LTS
Additional context
This issue was previously mentioned in a comment on a closed issue:
🔗 #203 (comment)