dmitry                                   Tue, 25 May 2010 11:38:48 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=299737

Log:
Fixed compatibility with "Run Time Cache" patch

Changed paths:
    U   php/php-src/trunk/ext/tidy/tidy.c

Modified: php/php-src/trunk/ext/tidy/tidy.c
===================================================================
--- php/php-src/trunk/ext/tidy/tidy.c   2010-05-25 10:37:17 UTC (rev 299736)
+++ php/php-src/trunk/ext/tidy/tidy.c   2010-05-25 11:38:48 UTC (rev 299737)
@@ -828,6 +828,9 @@
        tidySaveBuffer (obj->ptdoc->doc, &output);

        if (output.size) {
+               if (!obj->std.properties) {
+                       rebuild_object_properties(&obj->std);
+               }
                MAKE_STD_ZVAL(temp);
                ZVAL_STRINGL(temp, (char*)output.bp, output.size-1, TRUE);
                zend_hash_update(obj->std.properties, "value", sizeof("value"), 
(void *)&temp, sizeof(zval *), NULL);
@@ -836,6 +839,9 @@
        tidyBufFree(&output);

        if (obj->ptdoc->errbuf->size) {
+               if (!obj->std.properties) {
+                       rebuild_object_properties(&obj->std);
+               }
                MAKE_STD_ZVAL(temp);
                ZVAL_STRINGL(temp, (char*)obj->ptdoc->errbuf->bp, 
obj->ptdoc->errbuf->size-1, TRUE);
                zend_hash_update(obj->std.properties, "errorBuffer", 
sizeof("errorBuffer"), (void *)&temp, sizeof(zval *), NULL);
@@ -854,6 +860,9 @@
        switch(type) {

                case is_node:
+                       if (!obj->std.properties) {
+                               rebuild_object_properties(&obj->std);
+                       }
                        tidyBufInit(&buf);
                        tidyNodeGetText(obj->ptdoc->doc, obj->node, &buf);
                        ADD_PROPERTY_STRINGL(obj->std.properties, value, 
buf.bp, buf.size-1);
@@ -923,6 +932,9 @@
                        break;

                case is_doc:
+                       if (!obj->std.properties) {
+                               rebuild_object_properties(&obj->std);
+                       }
                        ADD_PROPERTY_NULL(obj->std.properties, errorBuffer);
                        ADD_PROPERTY_NULL(obj->std.properties, value);
                        break;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to