@@ -157,15 +157,15 @@ PHP_METHOD(Collection, insert)
157
157
lcb_cmdstore_collection (cmd , scope_str , scope_len , collection_str , collection_len );
158
158
if (options ) {
159
159
zval * prop , ret ;
160
- prop = zend_read_property (pcbc_insert_options_ce , getThis () , ZEND_STRL ("timeout" ), 0 , & ret );
160
+ prop = zend_read_property (pcbc_insert_options_ce , options , ZEND_STRL ("timeout" ), 0 , & ret );
161
161
if (Z_TYPE_P (prop ) == IS_LONG ) {
162
162
lcb_cmdstore_timeout (cmd , Z_LVAL_P (prop ));
163
163
}
164
- prop = zend_read_property (pcbc_insert_options_ce , getThis () , ZEND_STRL ("expiration" ), 0 , & ret );
164
+ prop = zend_read_property (pcbc_insert_options_ce , options , ZEND_STRL ("expiration" ), 0 , & ret );
165
165
if (Z_TYPE_P (prop ) == IS_LONG ) {
166
166
lcb_cmdstore_expiration (cmd , Z_LVAL_P (prop ));
167
167
}
168
- prop = zend_read_property (pcbc_insert_options_ce , getThis () , ZEND_STRL ("durability_level" ), 0 , & ret );
168
+ prop = zend_read_property (pcbc_insert_options_ce , options , ZEND_STRL ("durability_level" ), 0 , & ret );
169
169
if (Z_TYPE_P (prop ) == IS_LONG ) {
170
170
lcb_cmdstore_durability (cmd , Z_LVAL_P (prop ));
171
171
}
@@ -321,19 +321,19 @@ PHP_METHOD(Collection, upsert)
321
321
lcb_cmdstore_collection (cmd , scope_str , scope_len , collection_str , collection_len );
322
322
if (options ) {
323
323
zval * prop , ret ;
324
- prop = zend_read_property (pcbc_upsert_options_ce , getThis () , ZEND_STRL ("timeout" ), 0 , & ret );
324
+ prop = zend_read_property (pcbc_upsert_options_ce , options , ZEND_STRL ("timeout" ), 0 , & ret );
325
325
if (Z_TYPE_P (prop ) == IS_LONG ) {
326
326
lcb_cmdstore_timeout (cmd , Z_LVAL_P (prop ));
327
327
}
328
- prop = zend_read_property (pcbc_upsert_options_ce , getThis () , ZEND_STRL ("expiration" ), 0 , & ret );
328
+ prop = zend_read_property (pcbc_upsert_options_ce , options , ZEND_STRL ("expiration" ), 0 , & ret );
329
329
if (Z_TYPE_P (prop ) == IS_LONG ) {
330
330
lcb_cmdstore_expiration (cmd , Z_LVAL_P (prop ));
331
331
}
332
- prop = zend_read_property (pcbc_upsert_options_ce , getThis () , ZEND_STRL ("durability_level" ), 0 , & ret );
332
+ prop = zend_read_property (pcbc_upsert_options_ce , options , ZEND_STRL ("durability_level" ), 0 , & ret );
333
333
if (Z_TYPE_P (prop ) == IS_LONG ) {
334
334
lcb_cmdstore_durability (cmd , Z_LVAL_P (prop ));
335
335
}
336
- prop = zend_read_property (pcbc_upsert_options_ce , getThis () , ZEND_STRL ("cas" ), 0 , & ret );
336
+ prop = zend_read_property (pcbc_upsert_options_ce , options , ZEND_STRL ("cas" ), 0 , & ret );
337
337
if (Z_TYPE_P (prop ) == IS_STRING ) {
338
338
zend_string * decoded = php_base64_decode (Z_STRVAL_P (prop ), Z_STRLEN_P (prop ));
339
339
if (decoded ) {
@@ -495,19 +495,19 @@ PHP_METHOD(Collection, replace)
495
495
lcb_cmdstore_collection (cmd , scope_str , scope_len , collection_str , collection_len );
496
496
if (options ) {
497
497
zval * prop , ret ;
498
- prop = zend_read_property (pcbc_replace_options_ce , getThis () , ZEND_STRL ("timeout" ), 0 , & ret );
498
+ prop = zend_read_property (pcbc_replace_options_ce , options , ZEND_STRL ("timeout" ), 0 , & ret );
499
499
if (Z_TYPE_P (prop ) == IS_LONG ) {
500
500
lcb_cmdstore_timeout (cmd , Z_LVAL_P (prop ));
501
501
}
502
- prop = zend_read_property (pcbc_replace_options_ce , getThis () , ZEND_STRL ("expiration" ), 0 , & ret );
502
+ prop = zend_read_property (pcbc_replace_options_ce , options , ZEND_STRL ("expiration" ), 0 , & ret );
503
503
if (Z_TYPE_P (prop ) == IS_LONG ) {
504
504
lcb_cmdstore_expiration (cmd , Z_LVAL_P (prop ));
505
505
}
506
- prop = zend_read_property (pcbc_replace_options_ce , getThis () , ZEND_STRL ("durability_level" ), 0 , & ret );
506
+ prop = zend_read_property (pcbc_replace_options_ce , options , ZEND_STRL ("durability_level" ), 0 , & ret );
507
507
if (Z_TYPE_P (prop ) == IS_LONG ) {
508
508
lcb_cmdstore_durability (cmd , Z_LVAL_P (prop ));
509
509
}
510
- prop = zend_read_property (pcbc_replace_options_ce , getThis () , ZEND_STRL ("cas" ), 0 , & ret );
510
+ prop = zend_read_property (pcbc_replace_options_ce , options , ZEND_STRL ("cas" ), 0 , & ret );
511
511
if (Z_TYPE_P (prop ) == IS_STRING ) {
512
512
zend_string * decoded = php_base64_decode (Z_STRVAL_P (prop ), Z_STRLEN_P (prop ));
513
513
if (decoded ) {
@@ -639,7 +639,7 @@ static const zend_function_entry pcbc_append_options_methods[] = {
639
639
PHP_METHOD (Collection , append )
640
640
{
641
641
zend_string * id , * value ;
642
- zval * options ;
642
+ zval * options = NULL ;
643
643
lcb_STATUS err ;
644
644
645
645
int rv = zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "SS|O" , & id , & value , & options , pcbc_append_options_ce );
@@ -653,15 +653,15 @@ PHP_METHOD(Collection, append)
653
653
lcb_cmdstore_collection (cmd , scope_str , scope_len , collection_str , collection_len );
654
654
if (options ) {
655
655
zval * prop , ret ;
656
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("timeout" ), 0 , & ret );
656
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("timeout" ), 0 , & ret );
657
657
if (Z_TYPE_P (prop ) == IS_LONG ) {
658
658
lcb_cmdstore_timeout (cmd , Z_LVAL_P (prop ));
659
659
}
660
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("durability_level" ), 0 , & ret );
660
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("durability_level" ), 0 , & ret );
661
661
if (Z_TYPE_P (prop ) == IS_LONG ) {
662
662
lcb_cmdstore_durability (cmd , Z_LVAL_P (prop ));
663
663
}
664
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("cas" ), 0 , & ret );
664
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("cas" ), 0 , & ret );
665
665
if (Z_TYPE_P (prop ) == IS_STRING ) {
666
666
zend_string * decoded = php_base64_decode (Z_STRVAL_P (prop ), Z_STRLEN_P (prop ));
667
667
if (decoded ) {
@@ -767,7 +767,7 @@ static const zend_function_entry pcbc_prepend_options_methods[] = {
767
767
PHP_METHOD (Collection , prepend )
768
768
{
769
769
zend_string * id , * value ;
770
- zval * options ;
770
+ zval * options = NULL ;
771
771
lcb_STATUS err ;
772
772
773
773
int rv = zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "SS|O" , & id , & value , & options , pcbc_prepend_options_ce );
@@ -781,15 +781,15 @@ PHP_METHOD(Collection, prepend)
781
781
lcb_cmdstore_collection (cmd , scope_str , scope_len , collection_str , collection_len );
782
782
if (options ) {
783
783
zval * prop , ret ;
784
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("timeout" ), 0 , & ret );
784
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("timeout" ), 0 , & ret );
785
785
if (Z_TYPE_P (prop ) == IS_LONG ) {
786
786
lcb_cmdstore_timeout (cmd , Z_LVAL_P (prop ));
787
787
}
788
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("durability_level" ), 0 , & ret );
788
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("durability_level" ), 0 , & ret );
789
789
if (Z_TYPE_P (prop ) == IS_LONG ) {
790
790
lcb_cmdstore_durability (cmd , Z_LVAL_P (prop ));
791
791
}
792
- prop = zend_read_property (pcbc_append_options_ce , getThis () , ZEND_STRL ("cas" ), 0 , & ret );
792
+ prop = zend_read_property (pcbc_append_options_ce , options , ZEND_STRL ("cas" ), 0 , & ret );
793
793
if (Z_TYPE_P (prop ) == IS_STRING ) {
794
794
zend_string * decoded = php_base64_decode (Z_STRVAL_P (prop ), Z_STRLEN_P (prop ));
795
795
if (decoded ) {
0 commit comments