Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5

This commit is contained in:
Xinchen Hui 2014-07-19 13:12:26 +08:00
commit 629c1ecd4f
7 changed files with 54 additions and 17 deletions

4
NEWS
View File

@ -58,6 +58,10 @@ PHP NEWS
- Streams:
. Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam)
- Session:
. Fixed bug #66827 (Session raises E_NOTICE when session name variable is array).
(Yasuo)
27 Jun 2014, PHP 5.5.14
- Core:

View File

@ -1422,9 +1422,16 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC) /* {{{
}
/* }}} */
#define PPID2SID \
convert_to_string((*ppid)); \
PS(id) = estrndup(Z_STRVAL_PP(ppid), Z_STRLEN_PP(ppid))
static void ppid2sid(zval **ppid TSRMLS_DC) {
if (Z_TYPE_PP(ppid) != IS_STRING) {
PS(id) = NULL;
PS(send_cookie) = 1;
} else {
convert_to_string((*ppid));
PS(id) = estrndup(Z_STRVAL_PP(ppid), Z_STRLEN_PP(ppid));
PS(send_cookie) = 0;
}
}
PHPAPI void php_session_reset_id(TSRMLS_D) /* {{{ */
{
@ -1518,9 +1525,8 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */
Z_TYPE_PP(data) == IS_ARRAY &&
zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS
) {
PPID2SID;
ppid2sid(ppid TSRMLS_CC);
PS(apply_trans_sid) = 0;
PS(send_cookie) = 0;
PS(define_sid) = 0;
}
@ -1529,8 +1535,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */
Z_TYPE_PP(data) == IS_ARRAY &&
zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS
) {
PPID2SID;
PS(send_cookie) = 0;
ppid2sid(ppid TSRMLS_CC);
}
if (!PS(use_only_cookies) && !PS(id) &&
@ -1538,8 +1543,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */
Z_TYPE_PP(data) == IS_ARRAY &&
zend_hash_find(Z_ARRVAL_PP(data), PS(session_name), lensess + 1, (void **) &ppid) == SUCCESS
) {
PPID2SID;
PS(send_cookie) = 0;
ppid2sid(ppid TSRMLS_CC);
}
}

View File

@ -0,0 +1,12 @@
--TEST--
Bug #66827: Session raises E_NOTICE when session name variable is array.
--INI--
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$_COOKIE[session_name()] = array();
session_start();
echo 'OK';
--EXPECTF--
OK

View File

@ -183,7 +183,7 @@ msi-installer: dist
# need to redirect, since INSTALL is a file in the root...
install: really-install install-sdk
build-lib:
build-lib: build-ext-libs
@if not exist $(BUILD_DIR_DEV)\lib mkdir $(BUILD_DIR_DEV)\lib >nul
@copy $(BUILD_DIR)\$(PHPLIB) $(BUILD_DIR_DEV)\lib /y >nul

View File

@ -105,6 +105,11 @@ if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {
ERROR("Use of both --enable-debug and --enable-debug-pack not allowed.");
}
if (PHP_PREFIX == '') {
PHP_PREFIX = "C:\\php";
if (PHP_DEBUG == "yes")
PHP_PREFIX += "\\debug";
}
DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext ");

View File

@ -1362,9 +1362,6 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
cflags = "/FI main/config.pickle.h " + cflags;
}
if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
cflags = "/FI main/config.pickle.h " + cflags;
}
ADD_FLAG("CFLAGS_" + EXT, cflags);
if (PHP_DSP != "no") {
@ -1884,6 +1881,7 @@ function generate_phpize()
var MF = FSO.CreateTextFile(dest + "/phpize.js", true);
var DEPS = FSO.CreateTextFile(dest + "/ext_deps.js", true);
prefix = get_define("PHP_PREFIX");
prefix = prefix.replace(new RegExp("/", "g"), "\\");
prefix = prefix.replace(new RegExp("\\\\", "g"), "\\\\");
@ -1969,8 +1967,18 @@ function generate_makefile()
for (var i in extensions_enabled) {
var lib = "php_" + extensions_enabled[i][0] + ".lib";
var dll = "php_" + extensions_enabled[i][0] + ".dll";
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib\\" + lib);
//MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)\\" + dll);
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib");
MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)");
}
} else {
MF.WriteBlankLines(1);
MF.WriteLine("build-ext-libs:");
for (var i in extensions_enabled) {
var lib = "php_" + extensions_enabled[i][0] + ".lib";
if ('shared' == extensions_enabled[i][1]) {
MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib");
}
}
}
TF.Close();

View File

@ -40,9 +40,13 @@ function ERROR(msg)
function file_get_contents(filename)
{
var t = "";
var F = FSO.OpenTextFile(filename, 1);
var t = F.ReadAll();
F.Close();
if (!F.AtEndOfStream) {
t = F.ReadAll();
F.Close();
}
return t;
}