mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-11 03:00:49 +00:00
Compare commits
4
Commits
php-7.0.6
...
php-5.4.40
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e249836ea6 | ||
|
|
789fb16f4d | ||
|
|
aa6fcb485c | ||
|
|
9bd8c14dd5 |
No files matched your search
@@ -587,13 +587,14 @@ ZEND_METHOD(exception, getTraceAsString)
|
||||
|
||||
DEFAULT_0_PARAMS;
|
||||
|
||||
res = estrdup("");
|
||||
str = &res;
|
||||
|
||||
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
|
||||
if(Z_TYPE_P(trace) != IS_ARRAY) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
res = estrdup("");
|
||||
str = &res;
|
||||
|
||||
zend_hash_apply_with_arguments(Z_ARRVAL_P(trace) TSRMLS_CC, (apply_func_args_t)_build_trace_string, 3, str, len, &num);
|
||||
|
||||
s_tmp = emalloc(1 + MAX_LENGTH_OF_LONG + 7 + 1);
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=4
|
||||
PHP_RELEASE_VERSION=40
|
||||
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`
|
||||
|
||||
|
||||
+55
-54
@@ -187,10 +187,10 @@ ZEND_END_ARG_INFO();
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* class DOMDocument extends DOMNode
|
||||
* class DOMDocument extends DOMNode
|
||||
*
|
||||
* URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-i-Document
|
||||
* Since:
|
||||
* Since:
|
||||
*/
|
||||
|
||||
const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */
|
||||
@@ -235,10 +235,10 @@ const zend_function_entry php_dom_document_class_functions[] = { /* {{{ */
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ docType DOMDocumentType
|
||||
readonly=yes
|
||||
/* {{{ docType DOMDocumentType
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-B63ED1A31
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
@@ -266,15 +266,15 @@ int dom_document_doctype_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
return FAILURE;
|
||||
}
|
||||
return SUCCESS;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ implementation DOMImplementation
|
||||
readonly=yes
|
||||
/* {{{ implementation DOMImplementation
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1B793EBA
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
int dom_document_implementation_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
@@ -285,10 +285,10 @@ int dom_document_implementation_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ documentElement DOMElement
|
||||
readonly=yes
|
||||
/* {{{ documentElement DOMElement
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-87CD092
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
int dom_document_document_element_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
{
|
||||
@@ -391,8 +391,8 @@ int dom_document_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ standalone boolean
|
||||
readonly=no
|
||||
/* {{{ standalone boolean
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-standalone
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -455,7 +455,7 @@ int dom_document_standalone_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ version string
|
||||
/* {{{ version string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-version
|
||||
Since: DOM Level 3
|
||||
@@ -520,8 +520,8 @@ int dom_document_version_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ strictErrorChecking boolean
|
||||
readonly=no
|
||||
/* {{{ strictErrorChecking boolean
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-strictErrorChecking
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -565,7 +565,7 @@ int dom_document_strict_error_checking_write(dom_object *obj, zval *newval TSRML
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ formatOutput boolean
|
||||
/* {{{ formatOutput boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_format_output_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -607,7 +607,7 @@ int dom_document_format_output_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ validateOnParse boolean
|
||||
/* {{{ validateOnParse boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_validate_on_parse_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -649,7 +649,7 @@ int dom_document_validate_on_parse_write(dom_object *obj, zval *newval TSRMLS_DC
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ resolveExternals boolean
|
||||
/* {{{ resolveExternals boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_resolve_externals_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -691,7 +691,7 @@ int dom_document_resolve_externals_write(dom_object *obj, zval *newval TSRMLS_DC
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ preserveWhiteSpace boolean
|
||||
/* {{{ preserveWhiteSpace boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_preserve_whitespace_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -733,7 +733,7 @@ int dom_document_preserve_whitespace_write(dom_object *obj, zval *newval TSRMLS_
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ recover boolean
|
||||
/* {{{ recover boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_recover_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -775,7 +775,7 @@ int dom_document_recover_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ substituteEntities boolean
|
||||
/* {{{ substituteEntities boolean
|
||||
readonly=no
|
||||
*/
|
||||
int dom_document_substitue_entities_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
@@ -817,8 +817,8 @@ int dom_document_substitue_entities_write(dom_object *obj, zval *newval TSRMLS_D
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ documentURI string
|
||||
readonly=no
|
||||
/* {{{ documentURI string
|
||||
readonly=no
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-documentURI
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -881,8 +881,8 @@ int dom_document_document_uri_write(dom_object *obj, zval *newval TSRMLS_DC)
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ config DOMConfiguration
|
||||
readonly=yes
|
||||
/* {{{ config DOMConfiguration
|
||||
readonly=yes
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-config
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -897,7 +897,7 @@ int dom_document_config_read(dom_object *obj, zval **retval TSRMLS_DC)
|
||||
|
||||
/* {{{ proto DOMElement dom_document_create_element(string tagName [, string value]);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-2141741547
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_element)
|
||||
{
|
||||
@@ -930,7 +930,7 @@ PHP_FUNCTION(dom_document_create_element)
|
||||
|
||||
/* {{{ proto DOMDocumentFragment dom_document_create_document_fragment();
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-35CB04B5
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_document_fragment)
|
||||
{
|
||||
@@ -957,7 +957,7 @@ PHP_FUNCTION(dom_document_create_document_fragment)
|
||||
|
||||
/* {{{ proto DOMText dom_document_create_text_node(string data);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1975348127
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_text_node)
|
||||
{
|
||||
@@ -985,7 +985,7 @@ PHP_FUNCTION(dom_document_create_text_node)
|
||||
|
||||
/* {{{ proto DOMComment dom_document_create_comment(string data);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1334481328
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_comment)
|
||||
{
|
||||
@@ -1013,7 +1013,7 @@ PHP_FUNCTION(dom_document_create_comment)
|
||||
|
||||
/* {{{ proto DOMCdataSection dom_document_create_cdatasection(string data);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D26C0AF8
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_cdatasection)
|
||||
{
|
||||
@@ -1041,7 +1041,7 @@ PHP_FUNCTION(dom_document_create_cdatasection)
|
||||
|
||||
/* {{{ proto DOMProcessingInstruction dom_document_create_processing_instruction(string target, string data);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-135944439
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_processing_instruction)
|
||||
{
|
||||
@@ -1076,7 +1076,7 @@ PHP_FUNCTION(dom_document_create_processing_instruction)
|
||||
|
||||
/* {{{ proto DOMAttr dom_document_create_attribute(string name);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1084891198
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_attribute)
|
||||
{
|
||||
@@ -1110,7 +1110,7 @@ PHP_FUNCTION(dom_document_create_attribute)
|
||||
|
||||
/* {{{ proto DOMEntityReference dom_document_create_entity_reference(string name);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-392B75AE
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_create_entity_reference)
|
||||
{
|
||||
@@ -1143,7 +1143,7 @@ PHP_FUNCTION(dom_document_create_entity_reference)
|
||||
|
||||
/* {{{ proto DOMNodeList dom_document_get_elements_by_tag_name(string tagname);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C9094
|
||||
Since:
|
||||
Since:
|
||||
*/
|
||||
PHP_FUNCTION(dom_document_get_elements_by_tag_name)
|
||||
{
|
||||
@@ -1177,7 +1177,7 @@ PHP_FUNCTION(dom_document_import_node)
|
||||
xmlDocPtr docp;
|
||||
xmlNodePtr nodep, retnodep;
|
||||
dom_object *intern, *nodeobj;
|
||||
int ret;
|
||||
int ret;
|
||||
long recursive = 0;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &id, dom_document_class_entry, &node, dom_node_class_entry, &recursive) == FAILURE) {
|
||||
@@ -1188,7 +1188,7 @@ PHP_FUNCTION(dom_document_import_node)
|
||||
|
||||
DOM_GET_OBJ(nodep, node, xmlNodePtr, nodeobj);
|
||||
|
||||
if (nodep->type == XML_HTML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_NODE
|
||||
if (nodep->type == XML_HTML_DOCUMENT_NODE || nodep->type == XML_DOCUMENT_NODE
|
||||
|| nodep->type == XML_DOCUMENT_TYPE_NODE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot import: Node Type Not Supported");
|
||||
RETURN_FALSE;
|
||||
@@ -1278,7 +1278,7 @@ PHP_FUNCTION(dom_document_create_element_ns)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
nodep->ns = nsptr;
|
||||
|
||||
DOM_RET_OBJ(nodep, &ret, intern);
|
||||
@@ -1580,14 +1580,15 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int sourc
|
||||
xmlInitParser();
|
||||
|
||||
if (mode == DOM_LOAD_FILE) {
|
||||
char *file_dest;
|
||||
if (CHECK_NULL_PATH(source, source_len)) {
|
||||
return NULL;
|
||||
}
|
||||
char *file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
|
||||
file_dest = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN TSRMLS_CC);
|
||||
if (file_dest) {
|
||||
ctxt = xmlCreateFileParserCtxt(file_dest);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
ctxt = xmlCreateMemoryParserCtxt(source, source_len);
|
||||
}
|
||||
@@ -1909,7 +1910,7 @@ PHP_FUNCTION(dom_document_xinclude)
|
||||
zval *id;
|
||||
xmlDoc *docp;
|
||||
xmlNodePtr root;
|
||||
long flags = 0;
|
||||
long flags = 0;
|
||||
int err;
|
||||
dom_object *intern;
|
||||
|
||||
@@ -1922,7 +1923,7 @@ PHP_FUNCTION(dom_document_xinclude)
|
||||
err = xmlXIncludeProcessFlags(docp, flags);
|
||||
|
||||
/* XML_XINCLUDE_START and XML_XINCLUDE_END nodes need to be removed as these
|
||||
are added via xmlXIncludeProcess to mark beginning and ending of xincluded document
|
||||
are added via xmlXIncludeProcess to mark beginning and ending of xincluded document
|
||||
but are not wanted in resulting document - must be done even if err as it could fail after
|
||||
having processed some xincludes */
|
||||
root = (xmlNodePtr) docp->children;
|
||||
@@ -1938,7 +1939,7 @@ PHP_FUNCTION(dom_document_xinclude)
|
||||
} else {
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1959,19 +1960,19 @@ PHP_FUNCTION(dom_document_validate)
|
||||
DOM_GET_OBJ(docp, id, xmlDocPtr, intern);
|
||||
|
||||
cvp = xmlNewValidCtxt();
|
||||
|
||||
|
||||
cvp->userData = NULL;
|
||||
cvp->error = (xmlValidityErrorFunc) php_libxml_error_handler;
|
||||
cvp->warning = (xmlValidityErrorFunc) php_libxml_error_handler;
|
||||
|
||||
|
||||
if (xmlValidateDocument(cvp, docp)) {
|
||||
RETVAL_TRUE;
|
||||
} else {
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
xmlFreeValidCtxt(cvp);
|
||||
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -2011,7 +2012,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
|
||||
break;
|
||||
case DOM_LOAD_STRING:
|
||||
parser = xmlSchemaNewMemParserCtxt(source, source_len);
|
||||
/* If loading from memory, we need to set the base directory for the document
|
||||
/* If loading from memory, we need to set the base directory for the document
|
||||
but it is not apparent how to do that for schema's */
|
||||
break;
|
||||
default:
|
||||
@@ -2100,7 +2101,7 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ
|
||||
break;
|
||||
case DOM_LOAD_STRING:
|
||||
parser = xmlRelaxNGNewMemParserCtxt(source, source_len);
|
||||
/* If loading from memory, we need to set the base directory for the document
|
||||
/* If loading from memory, we need to set the base directory for the document
|
||||
but it is not apparent how to do that for schema's */
|
||||
break;
|
||||
default:
|
||||
@@ -2168,7 +2169,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||
int source_len, refcount, ret;
|
||||
long options = 0;
|
||||
htmlParserCtxtPtr ctxt;
|
||||
|
||||
|
||||
id = getThis();
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &source, &source_len, &options) == FAILURE) {
|
||||
@@ -2204,7 +2205,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
|
||||
htmlParseDocument(ctxt);
|
||||
newdoc = ctxt->myDoc;
|
||||
htmlFreeParserCtxt(ctxt);
|
||||
|
||||
|
||||
if (!newdoc)
|
||||
RETURN_FALSE;
|
||||
|
||||
@@ -2326,13 +2327,13 @@ PHP_FUNCTION(dom_document_save_html)
|
||||
php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document) TSRMLS_CC);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
buf = xmlBufferCreate();
|
||||
if (!buf) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not fetch buffer");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (node->type == XML_DOCUMENT_FRAG_NODE) {
|
||||
int one_size;
|
||||
|
||||
|
||||
@@ -1113,6 +1113,7 @@ static int phar_parse_pharfile(php_stream *fp, char *fname, int fname_len, char
|
||||
entry.metadata_len = 0;
|
||||
}
|
||||
if (len > endbuffer - buffer) {
|
||||
pefree(entry.filename, entry.is_persistent);
|
||||
MAPPHAR_FAIL("internal corruption of phar \"%s\" (truncated manifest entry)");
|
||||
}
|
||||
if (phar_parse_metadata(&buffer, &entry.metadata, len TSRMLS_CC) == FAILURE) {
|
||||
|
||||
+2
-2
@@ -3,6 +3,6 @@
|
||||
#define PHP_MAJOR_VERSION 5
|
||||
#define PHP_MINOR_VERSION 4
|
||||
#define PHP_RELEASE_VERSION 40
|
||||
#define PHP_EXTRA_VERSION "-dev"
|
||||
#define PHP_VERSION "5.4.40-dev"
|
||||
#define PHP_EXTRA_VERSION ""
|
||||
#define PHP_VERSION "5.4.40"
|
||||
#define PHP_VERSION_ID 50440
|
||||
Reference in new issue
Block a user