Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Insight] PHP configuration should not be changed dynamically #2

Open
sybrew opened this issue Aug 21, 2017 · 0 comments
Open

[Insight] PHP configuration should not be changed dynamically #2

sybrew opened this issue Aug 21, 2017 · 0 comments

Comments

@sybrew
Copy link
Owner

sybrew commented Aug 21, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant