Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions ext/dom/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Modern spec URL: https://dom.spec.whatwg.org/#dom-text-splittext
*/
PHP_METHOD(DOMText, splitText)
{
zval *id;
xmlChar *first;
xmlChar *second;
xmlNodePtr node;
Expand All @@ -105,11 +104,10 @@ PHP_METHOD(DOMText, splitText)
int length;
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &offset) == FAILURE) {
RETURN_THROWS();
}
DOM_GET_OBJ(node, id, xmlNodePtr, intern);
DOM_GET_OBJ(node, ZEND_THIS, xmlNodePtr, intern);

if (offset < 0) {
zend_argument_value_error(1, "must be greater than or equal to 0");
Expand Down Expand Up @@ -155,21 +153,11 @@ Since: DOM Level 3
*/
PHP_METHOD(DOMText, isWhitespaceInElementContent)
{
zval *id;
xmlNodePtr node;
dom_object *intern;

id = ZEND_THIS;
if (zend_parse_parameters_none() == FAILURE) {
RETURN_THROWS();
}
DOM_GET_OBJ(node, id, xmlNodePtr, intern);

if (xmlIsBlankNode(node)) {
RETURN_TRUE;
} else {
RETURN_FALSE;
}
ZEND_PARSE_PARAMETERS_NONE();
DOM_GET_OBJ(node, ZEND_THIS, xmlNodePtr, intern);
RETURN_BOOL(xmlIsBlankNode(node));
}
/* }}} end dom_text_is_whitespace_in_element_content */

Expand Down