php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #72269
Patch htscanner_php7.0.patch revision 2016-07-03 10:11 UTC by roel at abittechnical dot com
revision 2016-07-02 21:32 UTC by roel at abittechnical dot com
revision 2016-07-02 14:02 UTC by roel at abittechnical dot com
revision 2016-06-05 20:51 UTC by roel at abittechnical dot com
revision 2016-06-05 20:37 UTC by roel at abittechnical dot com
revision 2016-05-31 20:14 UTC by roel at abittechnical dot com

Patch htscanner_php7.0.patch for htscanner Bug #72269

Patch version 2016-07-02 21:32 UTC

Return to Bug #72269 | Download this patch
This patch is obsolete

Obsoleted by patches:

This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2016-07-03 10:11 UTC | 2016-07-02 21:32 UTC | 2016-07-02 14:02 UTC | 2016-06-05 20:51 UTC | 2016-06-05 20:37 UTC | 2016-05-31 20:14 UTC

Developer: roel@abittechnical.com



  --- htscanner.c	2012-03-01 16:14:32.000000000 +0100
 +++ htscanner.c	2016-06-27 09:12:58.333763791 +0200
 +++ htscanner.c	2016-07-02 23:19:32.023206655 +0200
  @@ -147,8 +147,16 @@
   #endif
   #if PHP_VERSION_ID < 50204
   	if (zend_alter_ini_entry(name, name_len + 1, value, value_len, mode, PHP_INI_STAGE_RUNTIME) == FAILURE) {


  +	if (res == FAILURE) {
   #endif
   		htscanner_debug("zend_alter_ini_entry failed!");
   		if (HTG(verbose)) {
 @@ -157,8 +165,22 @@
 @@ -157,8 +165,21 @@
   		return FAILURE;
   	}
   
  +#if PHP_VERSION_ID < 70000
Line 35 (now 35), was 14 lines, now 13 lines

  +	if (ini_entries)
  +		zend_hash_update(ini_entries, zname, &zval_value);
  +
  +	zend_string_release(zname);
 +	zend_string_release(zvalue);
  +#endif
   
   	return SUCCESS;
   }
 @@ -186,7 +208,11 @@
 @@ -186,7 +207,11 @@
   	}
   #endif
   
  +#if PHP_VERSION_ID < 70000


  +#endif
   	if (stream != NULL) {
   		char buf[FILE_BUFFER], *bufp, *tok, *value;
   		int flag, parse = 1;
 @@ -259,7 +285,7 @@
 @@ -259,7 +284,7 @@
   PHP_INI_BEGIN()
   	STD_PHP_INI_ENTRY("htscanner.config_file", ".htaccess", PHP_INI_SYSTEM, OnUpdateString, config_file, zend_htscanner_globals, htscanner_globals)
   	STD_PHP_INI_ENTRY("htscanner.default_docroot", "/", PHP_INI_SYSTEM, OnUpdateString, default_docroot, zend_htscanner_globals, htscanner_globals)
  -#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0)
  +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0) || PHP_MAJOR_VERSION >= 7
   	STD_PHP_INI_ENTRY("htscanner.default_ttl", "300", PHP_INI_SYSTEM, OnUpdateLong, default_ttl, zend_htscanner_globals, htscanner_globals)
   	STD_PHP_INI_ENTRY("htscanner.stop_on_error", "0", PHP_INI_SYSTEM, OnUpdateLong, stop_on_error, zend_htscanner_globals, htscanner_globals)
   	STD_PHP_INI_ENTRY("htscanner.verbose", "0", PHP_INI_SYSTEM, OnUpdateLong, verbose, zend_htscanner_globals, htscanner_globals)
 @@ -274,12 +300,23 @@
 @@ -274,12 +299,23 @@
   htscannerMutexDeclare(ini_entries_cache_mutex);
   static HashTable *ini_entries_cache = NULL;
   
  +#if PHP_VERSION_ID < 70000


  +#endif
   
   static int php_htscanner_create_cache() /* {{{ */
   {
 @@ -347,31 +384,62 @@
 @@ -347,31 +383,62 @@
   #endif
   
   	htscannerMutexLock(ini_entries_cache_mutex);
  +#if PHP_VERSION_ID < 70000


  +#endif
   			htscannerMutexUnlock(ini_entries_cache_mutex);
   			return SUCCESS;
   		}
 @@ -405,8 +473,13 @@
 @@ -405,8 +472,13 @@
   		}
   	}
   
  +#if PHP_VERSION_ID < 70000
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 11:01:30 2024 UTC