mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add missing properties to xsl stub (#12334)
* Define doXInclude for XSLTProcessor, and test the property This was added in8d1427dd98
, but never defined on the stub. It was more or less fine when dynamic properties were not deprecated, but now they throw a deprecation warning. To fix it, define on the stub. This should also help discoverability of the functionality. * Define cloneDocument for XSLTProcessor, and test the property This was introduced in5c039bbad9
, but never defined on the stub. It was more or less fine when dynamic properties were not deprecated, but now they throw a deprecation warning. To fix it, define on the stub. This should also help discoverability of the functionality.
This commit is contained in:
parent
42a85fc5d9
commit
3bb56ae418
8 changed files with 115 additions and 11 deletions
|
@ -313,11 +313,8 @@ PHP_METHOD(XSLTProcessor, importStylesheet)
|
|||
intern = Z_XSL_P(id);
|
||||
|
||||
member = ZSTR_INIT_LITERAL("cloneDocument", 0);
|
||||
cloneDocu = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv);
|
||||
if (Z_TYPE_P(cloneDocu) != IS_NULL) {
|
||||
convert_to_long(cloneDocu);
|
||||
clone_docu = Z_LVAL_P(cloneDocu);
|
||||
}
|
||||
cloneDocu = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_R, NULL, &rv);
|
||||
clone_docu = zend_is_true(cloneDocu);
|
||||
zend_string_release_ex(member, 0);
|
||||
if (clone_docu == 0) {
|
||||
/* check if the stylesheet is using xsl:key, if yes, we have to clone the document _always_ before a transformation */
|
||||
|
@ -415,11 +412,8 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
|
|||
}
|
||||
|
||||
member = ZSTR_INIT_LITERAL("doXInclude", 0);
|
||||
doXInclude = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_IS, NULL, &rv);
|
||||
if (Z_TYPE_P(doXInclude) != IS_NULL) {
|
||||
convert_to_long(doXInclude);
|
||||
ctxt->xinclude = Z_LVAL_P(doXInclude);
|
||||
}
|
||||
doXInclude = zend_std_read_property(Z_OBJ_P(id), member, BP_VAR_R, NULL, &rv);
|
||||
ctxt->xinclude = zend_is_true(doXInclude);
|
||||
zend_string_release_ex(member, 0);
|
||||
|
||||
secPrefsValue = intern->securityPrefs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue