Skip to content

Commit 916b2dd

Browse files
committed
Move context init below cache update
1 parent cc832a6 commit 916b2dd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

php_decimal.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,17 +2608,17 @@ PHP_MSHUTDOWN_FUNCTION(decimal)
26082608
*/
26092609
PHP_RINIT_FUNCTION(decimal)
26102610
{
2611+
#if defined(COMPILE_DL_DECIMAL) && defined(ZTS)
2612+
ZEND_TSRMLS_CACHE_UPDATE();
2613+
#endif
2614+
26112615
/* Initialize the shared context */
26122616
mpd_init(php_decimal_context(), PHP_DECIMAL_DEFAULT_PRECISION);
26132617

26142618
/* Set default rounding */
26152619
mpd_qsettraps(php_decimal_context(), PHP_DECIMAL_TRAPS);
26162620
mpd_qsetround(php_decimal_context(), PHP_DECIMAL_DEFAULT_ROUNDING);
26172621

2618-
#if defined(COMPILE_DL_DECIMAL) && defined(ZTS)
2619-
ZEND_TSRMLS_CACHE_UPDATE();
2620-
#endif
2621-
26222622
return SUCCESS;
26232623
}
26242624

0 commit comments

Comments
 (0)