SourceForge logo
SourceForge logo
Menu

phpwiki-checkins

From: Reini U. <ru...@us...> - 2005年04月11日 19:44:30
Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6138
Modified Files:
	prepend.php 
Log Message:
guard against php5 register-long-arrays
Index: prepend.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/prepend.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -2 -b -p -d -r1.34 -r1.35
--- prepend.php	27 Feb 2005 13:18:47 -0000	1.34
+++ prepend.php	11 Apr 2005 19:44:22 -0000	1.35
@@ -21,4 +21,15 @@ function check_php_version ($a = '0', $b
 }
 
+/** PHP5 deprecated old-style globals if !ini_get('register-long-arrays'). 
+ * See Bug #1180115
+ * We want to work with those old ones instead of the new superglobals, 
+ * for easier coding.
+ */
+foreach (array('SERVER','REQUEST','GET','POST','SESSION','ENV','COOKIE') as $k) {
+ if (!isset($GLOBALS['HTTP_'.$k.'_VARS']) and isset($GLOBALS['_'.$k]))
+ $GLOBALS['HTTP_'.$k.'_VARS'] =& $GLOBALS['_'.$k];
+}
+unset($k);
+
 // If your php was compiled with --enable-trans-sid it tries to
 // add a PHPSESSID query argument to all URL strings when cookie
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /