Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ext/sqlite3/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,6 @@ PHP_METHOD(SQLite3Stmt, __construct)
errcode = sqlite3_prepare_v2(db_obj->db, ZSTR_VAL(sql), ZSTR_LEN(sql), &(stmt_obj->stmt), NULL);
if (errcode != SQLITE_OK) {
php_sqlite3_error(db_obj, errcode, "Unable to prepare statement: %s", sqlite3_errmsg(db_obj->db));
zval_ptr_dtor(return_value);
RETURN_FALSE;
}
Comment on lines 1917 to 1920
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, this is a constructor so it should throw on error rather than creating a non-usable object.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would break people using a combination of reflection+manual __construct calls

stmt_obj->initialised = true;
Expand Down