Compare commits

...
7 Commits
Author SHA1 Message Date
Anatol Belski 37eb1e4d92 prepare final versions 2017-02-14 13:03:41 +01:00
Anatol Belski 3d718c5984 update NEWS 2017-02-01 20:23:05 +01:00
Anatol Belski 68683a4338 Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
This reverts commit 2fcf1259c6.
2017-02-01 20:22:43 +01:00
Anatol Belski 61438e9d4b Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
This reverts commit 62938bf088.
2017-02-01 20:22:40 +01:00
Remi Collet 35f6a5c481 fix test for 32bits (int -> float)
(cherry picked from commit 0f1ae93bfa)
2017-02-01 12:02:20 +01:00
Anatol Belski a85d8242b2 Revert "backport 51e1da6ea1 into 7.0"
This reverts commit 8da8756312.

(cherry picked from commit 5b5130c4ff)
2017-01-31 14:28:33 +01:00
Anatol Belski 2e11702601 set RC versions 2017-01-31 11:17:23 +01:00
8 changed files with 40 additions and 89 deletions

No files matched your search

+1 -2
View File
@@ -1,6 +1,6 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2017 PHP 7.0.16
16 Feb 2017 PHP 7.0.16
- Core:
. Fixed bug #73916 (zend_print_flat_zval_r doesn't consider reference).
@@ -13,7 +13,6 @@ PHP NEWS
- DOM:
. Fixed bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes).
(aboks)
. Fixed bug #50989 (support for LIBXML_NOXMLDECL). (jhdxr)
- DTrace:
. Fixed bug #73965 (DTrace reported as enabled when disabled). (Remi)
+1 -8
View File
@@ -899,12 +899,9 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
int bufindex = 0, isabsolute = 0;
wchar_t * reparsetarget;
BOOL isVolume = FALSE;
#if VIRTUAL_CWD_DEBUG
char printname[MAX_PATH];
int printname_len;
#endif
char substitutename[MAX_PATH];
int substitutename_len;
int printname_len, substitutename_len;
int substitutename_off = 0;
if(++(*ll) > LINK_MAX) {
@@ -931,7 +928,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
if(pbuffer->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
reparsetarget = pbuffer->SymbolicLinkReparseBuffer.ReparseTarget;
#if VIRTUAL_CWD_DEBUG
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
isabsolute = (pbuffer->SymbolicLinkReparseBuffer.Flags == 0) ? 1 : 0;
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
@@ -944,7 +940,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
};
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
printname[printname_len] = 0;
#endif
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
@@ -960,7 +955,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
else if(pbuffer->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) {
isabsolute = 1;
reparsetarget = pbuffer->MountPointReparseBuffer.ReparseTarget;
#if VIRTUAL_CWD_DEBUG
printname_len = pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
reparsetarget + pbuffer->MountPointReparseBuffer.PrintNameOffset / sizeof(WCHAR),
@@ -971,7 +965,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
return -1;
};
printname[pbuffer->MountPointReparseBuffer.PrintNameLength / sizeof(WCHAR)] = 0;
#endif
substitutename_len = pbuffer->MountPointReparseBuffer.SubstituteNameLength / sizeof(WCHAR);
if (!WideCharToMultiByte(CP_THREAD_ACP, 0,
+1 -1
View File
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=0
PHP_RELEASE_VERSION=16
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+33 -29
View File
@@ -26,7 +26,6 @@
#include "php.h"
#if HAVE_LIBXML && HAVE_DOM
#include "php_dom.h"
#include <libxml/xmlsave.h>
#include <libxml/SAX.h>
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/relaxng.h>
@@ -1617,54 +1616,59 @@ PHP_FUNCTION(dom_document_savexml)
dom_doc_propsptr doc_props;
int size, format, saveempty = 0;
zend_long options = 0;
xmlSaveCtxtPtr xscp;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O|O!l", &id, dom_document_class_entry, &nodep, dom_node_class_entry, &options) == FAILURE) {
return;
}
options = options | XML_SAVE_AS_XML;
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
doc_props = dom_get_doc_props(intern->document);
format = doc_props->formatoutput;
if (format) {
options = options | XML_SAVE_FORMAT;
}
buf = xmlBufferCreate();
if (!buf) {
php_error_docref(NULL, E_WARNING, "Could not fetch buffer");
RETURN_FALSE;
}
xscp = xmlSaveToBuffer(buf, docp->encoding, options);
if (nodep != NULL) {
/* Dump contents of Node */
DOM_GET_OBJ(node, nodep, xmlNodePtr, nodeobj);
if (node->doc != docp) {
php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document));
RETURN_FALSE;
}
buf = xmlBufferCreate();
if (!buf) {
php_error_docref(NULL, E_WARNING, "Could not fetch buffer");
RETURN_FALSE;
}
if (options & LIBXML_SAVE_NOEMPTYTAG) {
saveempty = xmlSaveNoEmptyTags;
xmlSaveNoEmptyTags = 1;
}
xmlNodeDump(buf, docp, node, 0, format);
if (options & LIBXML_SAVE_NOEMPTYTAG) {
xmlSaveNoEmptyTags = saveempty;
}
mem = (xmlChar*) xmlBufferContent(buf);
if (!mem) {
xmlBufferFree(buf);
RETURN_FALSE;
}
if(xmlSaveTree(xscp, node) < 0) {
xmlBufferFree(buf);
RETURN_FALSE;
}
} else {
if(xmlSaveDoc(xscp, docp) < 0) {
xmlBufferFree(buf);
RETURN_FALSE;
}
}
xmlSaveClose(xscp);
mem = (xmlChar*) xmlBufferContent(buf);
if (!mem) {
RETVAL_STRING((char *) mem);
xmlBufferFree(buf);
RETURN_FALSE;
} else {
if (options & LIBXML_SAVE_NOEMPTYTAG) {
saveempty = xmlSaveNoEmptyTags;
xmlSaveNoEmptyTags = 1;
}
/* Encoding is handled from the encoding property set on the document */
xmlDocDumpFormatMemory(docp, &mem, &size, format);
if (options & LIBXML_SAVE_NOEMPTYTAG) {
xmlSaveNoEmptyTags = saveempty;
}
if (!size || !mem) {
RETURN_FALSE;
}
RETVAL_STRINGL((char *) mem, size);
xmlFree(mem);
}
RETVAL_STRING((char *) mem);
xmlBufferFree(buf);
}
/* }}} end dom_document_savexml */
@@ -1,33 +0,0 @@
--TEST--
DOM Document: saveXML with createElement and formatOutput
--CREDITS--
CHU Zhaowei <jhdxr@php.net>
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$dom = new domDocument('1.0', 'UTF-8');
$dom->formatOutput = true;
$root = $dom->createElement('root');
$dom->appendChild($root);
$child1 = $dom->createElement('testsuite');
$root->appendChild($child1);
$child11 = $dom->createElement('testcase');
$child11->setAttribute('name', 'leaf1');
$child12 = $dom->createElement('testcase');
$child12->setAttribute('name', 'leaf2');
$child1->appendChild($child11);
$child1->appendChild($child12);
echo $dom->saveXml();
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<root>
<testsuite>
<testcase name="leaf1"/>
<testcase name="leaf2"/>
</testsuite>
</root>
-12
View File
@@ -1,12 +0,0 @@
--TEST--
Bug #50989 add support LIBXML_NOXMLDECL for DOMDocument::saveXML()
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$dom = new DomDocument();
$dom->loadXML("<foo />");
print $dom->saveXML(null,LIBXML_NOXMLDECL);
--EXPECT--
<foo/>
+2 -2
View File
@@ -14,5 +14,5 @@ $poc = 'O:8:"stdClass":1:{i:0;O:3:"obj":1:{s:4:"ryat";R:1;}}';
var_dump(unserialize($poc));
?>
--EXPECT--
int(73588229205)
--EXPECTF--
%s(73588229205)
+2 -2
View File
@@ -3,6 +3,6 @@
#define PHP_MAJOR_VERSION 7
#define PHP_MINOR_VERSION 0
#define PHP_RELEASE_VERSION 16
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "7.0.16-dev"
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "7.0.16"
#define PHP_VERSION_ID 70016