tony2001                Thu Dec 30 06:57:40 2004 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/ext/tidy   tidy.c 
  Log:
  MFH
  
  
http://cvs.php.net/diff.php/php-src/ext/tidy/tidy.c?r1=1.56.2.3&r2=1.56.2.4&ty=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.56.2.3 php-src/ext/tidy/tidy.c:1.56.2.4
--- php-src/ext/tidy/tidy.c:1.56.2.3    Sun Nov 14 08:35:48 2004
+++ php-src/ext/tidy/tidy.c     Thu Dec 30 06:57:40 2004
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: tidy.c,v 1.56.2.3 2004/11/14 13:35:48 tony2001 Exp $ */
+/* $Id: tidy.c,v 1.56.2.4 2004/12/30 11:57:40 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -428,15 +428,17 @@
        TIDY_SET_DEFAULT_CONFIG(doc);
        
        /* We can't use TIDY_APPLY_CONFIG_ZVAL() here, it uses RETURN_FALSE */
-          
-       if(Z_TYPE_P(config) == IS_ARRAY) {
-               _php_tidy_apply_config_array(doc, HASH_OF(config) TSRMLS_CC);
-       } else {
-               convert_to_string_ex(&config);
-               TIDY_SAFE_MODE_CHECK(Z_STRVAL_P(config));
-               if (tidyLoadConfig(doc, Z_STRVAL_P(config)) < 0) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not 
load configuration file '%s'", Z_STRVAL_P(config));
-                       RETVAL_FALSE;
+       
+       if (ZEND_NUM_ARGS() > 1) {
+               if(Z_TYPE_P(config) == IS_ARRAY) {
+                       _php_tidy_apply_config_array(doc, HASH_OF(config) 
TSRMLS_CC);
+               } else {
+                       convert_to_string_ex(&config);
+                       TIDY_SAFE_MODE_CHECK(Z_STRVAL_P(config));
+                       if (tidyLoadConfig(doc, Z_STRVAL_P(config)) < 0) {
+                               php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Could not load configuration file '%s'", Z_STRVAL_P(config));
+                               RETVAL_FALSE;
+                       }
                }
        }
 
@@ -954,7 +956,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Tidy support", "enabled");
        php_info_print_table_row(2, "libTidy Release", (char 
*)tidyReleaseDate());
-       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.56.2.3 2004/11/14 13:35:48 tony2001 
Exp $)");
+       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.56.2.4 2004/12/30 11:57:40 tony2001 
Exp $)");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();

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

Reply via email to