Skip to content

Commit b4c907d

Browse files
committed
PHPC-460: Fix variable reference in UTCDateTime export on 32-bit
1 parent 7b7596c commit b4c907d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/BSON/UTCDateTime.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ HashTable *php_phongo_utcdatetime_get_properties(zval *object TSRMLS_DC) /* {{{
370370
php_phongo_utcdatetime_t *intern;
371371
HashTable *props;
372372

373+
#if SIZEOF_LONG == 4
374+
char s_milliseconds[24];
375+
int s_milliseconds_len;
376+
#endif
377+
373378
intern = Z_UTCDATETIME_OBJ_P(object);
374379
props = zend_std_get_properties(object TSRMLS_CC);
375380

@@ -378,12 +383,7 @@ HashTable *php_phongo_utcdatetime_get_properties(zval *object TSRMLS_DC) /* {{{
378383
}
379384

380385
#if SIZEOF_LONG == 4
381-
{
382-
char s_milliseconds[24];
383-
int s_milliseconds_len;
384-
385-
s_milliseconds_len = snprintf(s_milliseconds, sizeof(s_milliseconds), "%" PRId64, intern->milliseconds);
386-
}
386+
s_milliseconds_len = snprintf(s_milliseconds, sizeof(s_milliseconds), "%" PRId64, intern->milliseconds);
387387
#endif
388388

389389
#if PHP_VERSION_ID >= 70000

0 commit comments

Comments
 (0)