summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_statement.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-05-19 19:20:01 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-05-19 19:20:01 +0000
commita607ee15a8fb3a1475d6193cc5251e8c43e88955 (patch)
tree3d987c8e01fdae3473a933cc8848c8655fb84ea9 /ext/pdo_sqlite/sqlite_statement.c
parent1989085325294aefc791e52931aa9cb2db5d5062 (diff)
downloadphp-git-a607ee15a8fb3a1475d6193cc5251e8c43e88955.tar.gz
MFB: The \0 removal is only needed prior to 3.4.0
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r--ext/pdo_sqlite/sqlite_statement.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c
index 52e4b62bd6..8827f8b216 100644
--- a/ext/pdo_sqlite/sqlite_statement.c
+++ b/ext/pdo_sqlite/sqlite_statement.c
@@ -244,10 +244,12 @@ static int pdo_sqlite_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsi
default:
*ptr = (char*)sqlite3_column_text(S->stmt, colno);
*len = sqlite3_column_bytes(S->stmt, colno);
+#if SQLITE_VERSION_NUMBER < 3004000
if (*len) {
/* sqlite3.h says "the NUL terminator is included in the byte count for TEXT values" */
- *len--; /* do not remove this, even though it generates a warning */
+ (*len)--;
}
+#endif
return 1;
}
}