Get rid of always-false intern checks

These checks are always false because we're receiving a valid
zend_object.
This commit is contained in:
Niels Dossche 2025-02-09 18:55:14 +01:00
parent bc74cff479
commit c0d910d506

View file

@ -2163,10 +2163,6 @@ static void php_sqlite3_object_free_storage(zend_object *object) /* {{{ */
php_sqlite3_func *func; php_sqlite3_func *func;
php_sqlite3_collation *collation; php_sqlite3_collation *collation;
if (!intern) {
return;
}
/* Release function_name from authorizer */ /* Release function_name from authorizer */
if (ZEND_FCC_INITIALIZED(intern->authorizer_fcc)) { if (ZEND_FCC_INITIALIZED(intern->authorizer_fcc)) {
zend_fcc_dtor(&intern->authorizer_fcc); zend_fcc_dtor(&intern->authorizer_fcc);
@ -2262,10 +2258,6 @@ static void php_sqlite3_stmt_object_free_storage(zend_object *object) /* {{{ */
{ {
php_sqlite3_stmt *intern = php_sqlite3_stmt_from_obj(object); php_sqlite3_stmt *intern = php_sqlite3_stmt_from_obj(object);
if (!intern) {
return;
}
if (intern->bound_params) { if (intern->bound_params) {
zend_hash_destroy(intern->bound_params); zend_hash_destroy(intern->bound_params);
FREE_HASHTABLE(intern->bound_params); FREE_HASHTABLE(intern->bound_params);
@ -2289,10 +2281,6 @@ static void php_sqlite3_result_object_free_storage(zend_object *object) /* {{{ *
{ {
php_sqlite3_result *intern = php_sqlite3_result_from_obj(object); php_sqlite3_result *intern = php_sqlite3_result_from_obj(object);
if (!intern) {
return;
}
sqlite3result_clear_column_names_cache(intern); sqlite3result_clear_column_names_cache(intern);
if (!Z_ISNULL(intern->stmt_obj_zval)) { if (!Z_ISNULL(intern->stmt_obj_zval)) {