Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last query param can be lost #22

Merged

Conversation

Fneufneu
Copy link

@Fneufneu Fneufneu commented Jun 1, 2017

fix this case:

$connection->query('INSERT INTO book (name, ISBN, author, created) VALUES (?, ?, ?, ?)',
    $name, $isbn, $author, 0);

which give:
Fatal error: Uncaught LogicException: Params not enouth to build sql in src/Query.php:120

Push the the last query's parm even if it's null, 0 or ''.
The previous test was bad, we can't trust array_pop return, just
add it back if we have enough args.
@bixuehujin bixuehujin merged commit acda941 into friends-of-reactphp:master Jun 1, 2017
@clue clue added this to the v0.3.0 milestone Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants