The-SEO-Framework-Extension-Manager icon indicating copy to clipboard operation
The-SEO-Framework-Extension-Manager copied to clipboard

[Insight] PHP configuration should not be changed dynamically

Open sybrew opened this issue 7 years ago • 0 comments

in extensions/premium/local/trunk/inc/traits/schema-packer.trait.php, line 107

Changing PHP configuration dynamically through ini_set() may create hard to debug errors.

static $prev = null;

if ( $this->should_change_precision() && $this->can_change_precision() ) {
	if ( $reset ) {
		$prev && ini_set( 'serialize_precision', $prev );
	} else {
		$prev = ini_get( 'serialize_precision' );
		ini_set( 'serialize_precision', '-1' );
	}
}

Posted from SensioLabsInsight


I'm wondering if there's an alternative. Although, I haven't found any so far. What has been implemented is not a definite solution, because if the php_ini change is blocked, the causal issue will persist.

sybrew avatar Aug 21 '17 11:08 sybrew