@@ -1274,6 +1274,8 @@ PHP_METHOD(sqlite3stmt, paramCount)
1274
1274
php_sqlite3_stmt * stmt_obj ;
1275
1275
zval * object = getThis ();
1276
1276
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1277
+
1278
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1277
1279
1278
1280
if (zend_parse_parameters_none () == FAILURE ) {
1279
1281
return ;
@@ -1290,6 +1292,8 @@ PHP_METHOD(sqlite3stmt, close)
1290
1292
php_sqlite3_stmt * stmt_obj ;
1291
1293
zval * object = getThis ();
1292
1294
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1295
+
1296
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1293
1297
1294
1298
if (zend_parse_parameters_none () == FAILURE ) {
1295
1299
return ;
@@ -1308,6 +1312,8 @@ PHP_METHOD(sqlite3stmt, reset)
1308
1312
php_sqlite3_stmt * stmt_obj ;
1309
1313
zval * object = getThis ();
1310
1314
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1315
+
1316
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1311
1317
1312
1318
if (zend_parse_parameters_none () == FAILURE ) {
1313
1319
return ;
@@ -1328,6 +1334,8 @@ PHP_METHOD(sqlite3stmt, clear)
1328
1334
php_sqlite3_stmt * stmt_obj ;
1329
1335
zval * object = getThis ();
1330
1336
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1337
+
1338
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1331
1339
1332
1340
if (zend_parse_parameters_none () == FAILURE ) {
1333
1341
return ;
@@ -1349,6 +1357,8 @@ PHP_METHOD(sqlite3stmt, readOnly)
1349
1357
php_sqlite3_stmt * stmt_obj ;
1350
1358
zval * object = getThis ();
1351
1359
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1360
+
1361
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1352
1362
1353
1363
if (zend_parse_parameters_none () == FAILURE ) {
1354
1364
return ;
@@ -1416,6 +1426,8 @@ PHP_METHOD(sqlite3stmt, bindParam)
1416
1426
zval * object = getThis ();
1417
1427
struct php_sqlite3_bound_param param = {0 };
1418
1428
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1429
+
1430
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1419
1431
1420
1432
param .param_number = -1 ;
1421
1433
param .type = SQLITE3_TEXT ;
@@ -1447,6 +1459,8 @@ PHP_METHOD(sqlite3stmt, bindValue)
1447
1459
zval * object = getThis ();
1448
1460
struct php_sqlite3_bound_param param = {0 };
1449
1461
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1462
+
1463
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1450
1464
1451
1465
param .param_number = -1 ;
1452
1466
param .type = SQLITE3_TEXT ;
@@ -1482,6 +1496,8 @@ PHP_METHOD(sqlite3stmt, execute)
1482
1496
1483
1497
stmt_obj = (php_sqlite3_stmt * )zend_object_store_get_object (object TSRMLS_CC );
1484
1498
1499
+ SQLITE3_CHECK_INITIALIZED (stmt_obj -> db_obj , stmt_obj -> initialised , SQLite3 )
1500
+
1485
1501
if (zend_parse_parameters_none () == FAILURE ) {
1486
1502
return ;
1487
1503
}
0 commit comments