php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68018
Patch master-fpm-ini-modifiable.patch revision 2014-09-13 19:54 UTC by manuel-php at mausz dot at

Patch master-fpm-ini-modifiable.patch for FPM related Bug #68018

Patch version 2014-09-13 19:54 UTC

Return to Bug #68018 | Download this patch
Patch Revisions:

Developer: manuel-php@mausz.at

diff -Naur php-src-master.orig/sapi/fpm/fpm/fpm_php.c php-src-master/sapi/fpm/fpm/fpm_php.c
--- php-src-master.orig/sapi/fpm/fpm/fpm_php.c	2014-09-13 13:52:10.000000000 +0200
+++ php-src-master/sapi/fpm/fpm/fpm_php.c	2014-09-13 21:20:09.354970563 +0200
@@ -32,13 +32,20 @@
 		return FAILURE;
 	}
 
+	if (mode == ZEND_INI_SYSTEM) {
+		ini_entry->modifiable = ZEND_INI_SYSTEM;
+	}
+
+	if (!(ini_entry->modifiable & mode)) {
+		return FAILURE;
+	}
+
 	duplicate = zend_string_init(new_value, new_value_length, 1);
 
 	if (!ini_entry->on_modify
 			|| ini_entry->on_modify(ini_entry, duplicate,
 				ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC) == SUCCESS) {
 		ini_entry->value = duplicate;
-		ini_entry->modifiable = mode;
 	} else {
 		zend_string_release(duplicate);
 	}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 00:01:30 2024 UTC