Skip to content

Commit e7678cd

Browse files
committed
sqlite3: Use Z_TRY_ADDREF
1 parent 41d3440 commit e7678cd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ext/sqlite3/sqlite3.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,9 +2479,7 @@ static zend_always_inline void php_sqlite3_fetch_one(int n_cols, php_sqlite3_res
24792479

24802480
if (mode & PHP_SQLITE3_ASSOC) {
24812481
if (mode & PHP_SQLITE3_NUM) {
2482-
if (Z_REFCOUNTED(data)) {
2483-
Z_ADDREF(data);
2484-
}
2482+
Z_TRY_ADDREF(data);
24852483
}
24862484
/* Note: we can't use the "add_new" variant here instead of "update" because
24872485
* when the same column name is encountered, the last result should be taken. */

0 commit comments

Comments
 (0)