[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2004-01-02 Thread changelog
changelog   Fri Jan  2 20:32:07 2004 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.373 ZendEngine2/ChangeLog:1.374
--- ZendEngine2/ChangeLog:1.373 Wed Dec 31 20:32:07 2003
+++ ZendEngine2/ChangeLog   Fri Jan  2 20:32:06 2004
@@ -1,3 +1,9 @@
+2004-01-02  Andrei Zmievski  [EMAIL PROTECTED]
+
+* zend_default_classes.c:
+  Do not show exception message if it's empty.
+  
+
 2003-12-31  Andrei Zmievski  [EMAIL PROTECTED]
 
 * zend_default_classes.c:
@@ -2610,7 +2616,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.373 2004/01/01 01:32:07 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.374 2004/01/03 01:32:06 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -4334,7 +4340,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.373 2004/01/01 01:32:07 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.374 2004/01/03 01:32:06 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


Re: [PHP-CVS] cvs: php-src /ext/standard file.c

2004-01-02 Thread Andi Gutmans
then should be than.

At 12:57 AM 1/2/2004 +, Ilia Alshanetsky wrote:
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Length parameter must be greater then 0.);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /ext/oci8 oci8.c

2004-01-02 Thread Jani Taskinen
sniper  Fri Jan  2 09:09:52 2004 EDT

  Modified files:  
/php-src/ext/oci8   oci8.c 
  Log:
  another ZTS fix
  
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.229 php-src/ext/oci8/oci8.c:1.230
--- php-src/ext/oci8/oci8.c:1.229   Thu Jan  1 21:21:44 2004
+++ php-src/ext/oci8/oci8.c Fri Jan  2 09:09:49 2004
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.229 2004/01/02 02:21:44 sniper Exp $ */
+/* $Id: oci8.c,v 1.230 2004/01/02 14:09:49 sniper Exp $ */
 
 /* TODO list:
  *
@@ -775,7 +775,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.229 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.230 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -829,6 +829,8 @@
 static void 
 _oci_desc_flush_hash_dtor(void *data)
 {
+   TSRMLS_FETCH();
+   
oci_descriptor *descr = *((oci_descriptor **)data);
if (descr-buffering == 2  (descr-type == OCI_DTYPE_LOB || descr-type == 
OCI_DTYPE_FILE)) {
 oci_lob_flush(descr,OCI_LOB_BUFFER_FREE TSRMLS_CC);

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



[PHP-CVS] cvs: php-src /sapi/cli php_cli.c

2004-01-02 Thread Edin Kadribasic
edink   Fri Jan  2 17:31:33 2004 EDT

  Modified files:  
/php-src/sapi/cli   php_cli.c 
  Log:
  Disable output buffering in CLI overriding php.ini setting.
  Fixes #26755.
  
  
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.104 php-src/sapi/cli/php_cli.c:1.105
--- php-src/sapi/cli/php_cli.c:1.104Mon Dec 22 08:08:04 2003
+++ php-src/sapi/cli/php_cli.c  Fri Jan  2 17:31:32 2004
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.104 2003/12/22 13:08:04 wez Exp $ */
+/* $Id: php_cli.c,v 1.105 2004/01/02 22:31:32 edink Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -686,6 +686,7 @@
INI_HARDCODED(register_argc_argv, 1);
INI_HARDCODED(html_errors, 0);
INI_HARDCODED(implicit_flush, 1);
+   INI_HARDCODED(output_buffering, 0);
INI_HARDCODED(max_execution_time, 0);
 
optind = orig_optind;

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



[PHP-CVS] cvs: php-src /ext/standard file.c

2004-01-02 Thread Ilia Alshanetsky
iliaa   Fri Jan  2 19:48:57 2004 EDT

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  s/then/than/ Thanks Jani  Andi
  
  
  
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.372 php-src/ext/standard/file.c:1.373
--- php-src/ext/standard/file.c:1.372   Thu Jan  1 19:57:23 2004
+++ php-src/ext/standard/file.c Fri Jan  2 19:48:55 2004
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.372 2004/01/02 00:57:23 iliaa Exp $ */
+/* $Id: file.c,v 1.373 2004/01/03 00:48:55 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -920,7 +920,7 @@
len = Z_LVAL_PP(arg2);
 
if (len = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater than 0.);
RETURN_FALSE;
}
 
@@ -1027,7 +1027,7 @@
if (bytes != NULL) {
convert_to_long_ex(bytes);
if (Z_LVAL_PP(bytes) = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater than 0.);
RETURN_FALSE;
}
 
@@ -1641,7 +1641,7 @@
convert_to_long_ex(arg2);
len = Z_LVAL_PP(arg2);
if (len = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater than 0.);
RETURN_FALSE;
}
 

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard file.c

2004-01-02 Thread Ilia Alshanetsky
iliaa   Fri Jan  2 19:50:02 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   file.c 
  Log:
  MFH: s/then/than/
  
  
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.279.2.51 php-src/ext/standard/file.c:1.279.2.52
--- php-src/ext/standard/file.c:1.279.2.51  Thu Jan  1 19:58:15 2004
+++ php-src/ext/standard/file.c Fri Jan  2 19:50:01 2004
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.279.2.51 2004/01/02 00:58:15 iliaa Exp $ */
+/* $Id: file.c,v 1.279.2.52 2004/01/03 00:50:01 iliaa Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -1375,7 +1375,7 @@
len = Z_LVAL_PP(arg2);
 
if (len = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter 
must be greater than 0.);
RETURN_FALSE;
}
 
@@ -1472,7 +1472,7 @@
convert_to_long_ex(bytes);
len = Z_LVAL_PP(bytes);
if (len = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater than 0.);
RETURN_FALSE;
}
 
@@ -2137,7 +2137,7 @@
convert_to_long_ex(arg2);
len = Z_LVAL_PP(arg2);
if (len = 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater then 0.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must be 
greater than 0.);
RETURN_FALSE;
}
 

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



Re: [PHP-CVS] cvs: php-src /ext/standard file.c

2004-01-02 Thread Moriyoshi Koizumi
On 2004/01/02, at 9:57, Ilia Alshanetsky wrote:

-		if (len  0) {
-			php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter may 
not be negative);
+		if (len = 0) {
+			php_error_docref(NULL TSRMLS_CC, E_WARNING, Length parameter must 
be greater then 0.);
 			RETURN_FALSE;
 		}
I think this may cause a slight BC break, because they wouldn't
raise warnings if the length is 0. How about returning FALSE
silently in that case?
Moriyoshi

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


Re: [PHP-CVS] cvs: php-src /ext/standard file.c

2004-01-02 Thread Ilia Alshanetsky
On January 02, 2004 08:28 pm, Moriyoshi Koizumi wrote:
 I think this may cause a slight BC break, because they wouldn't
 raise warnings if the length is 0. How about returning FALSE
 silently in that case?

fgets($fp, 0) is pretty pointless and should raise an error. If it does not 
raise an error it makes spotting and resolving the problem that much more 
difficult. With a clear warning fixing this issue in the code is much 
simpler.

Ilia

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



Re: [PHP-CVS] cvs: php-src /sapi/cli php_cli.c

2004-01-02 Thread Jani Taskinen
  
MFH?

--Jani

On Fri, 2 Jan 2004, Edin Kadribasic wrote:

edink  Fri Jan  2 17:31:33 2004 EDT

  Modified files:  
/php-src/sapi/cli  php_cli.c 
  Log:
  Disable output buffering in CLI overriding php.ini setting.
  Fixes #26755.
  
  
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.104 php-src/sapi/cli/php_cli.c:1.105
--- php-src/sapi/cli/php_cli.c:1.104   Mon Dec 22 08:08:04 2003
+++ php-src/sapi/cli/php_cli.c Fri Jan  2 17:31:32 2004
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.104 2003/12/22 13:08:04 wez Exp $ */
+/* $Id: php_cli.c,v 1.105 2004/01/02 22:31:32 edink Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -686,6 +686,7 @@
   INI_HARDCODED(register_argc_argv, 1);
   INI_HARDCODED(html_errors, 0);
   INI_HARDCODED(implicit_flush, 1);
+  INI_HARDCODED(output_buffering, 0);
   INI_HARDCODED(max_execution_time, 0);
 
   optind = orig_optind;



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



[PHP-CVS] cvs: php-src /ext/tidy/examples cleanhtml.php cleanhtml5.php dumpit5.php urlgrab.php urlgrab5.php /ext/tidy/tests 007.phpt 008.phpt 009.phpt 010.phpt 011.phpt 012.phpt 013.phpt

2004-01-02 Thread John Coggeshall
johnSat Jan  3 00:23:25 2004 EDT

  Added files: 
/php-src/ext/tidy/examples  cleanhtml5.php dumpit5.php urlgrab5.php 
/php-src/ext/tidy/tests 008.phpt 009.phpt 010.phpt 011.phpt 
012.phpt 013.phpt 

  Modified files:  
/php-src/ext/tidy/examples  cleanhtml.php urlgrab.php 
/php-src/ext/tidy/tests 007.phpt 
  Log:
  Added examples for tidy v2.0 (in PHP5) and a few more tests..
  
  Index: php-src/ext/tidy/examples/cleanhtml.php
diff -u php-src/ext/tidy/examples/cleanhtml.php:1.2 
php-src/ext/tidy/examples/cleanhtml.php:1.3
--- php-src/ext/tidy/examples/cleanhtml.php:1.2 Mon Sep 22 14:40:37 2003
+++ php-src/ext/tidy/examples/cleanhtml.php Sat Jan  3 00:23:23 2004
@@ -6,6 +6,8 @@
  * A simple script to clean and repair HTML,XHTML,PHP,ASP,etc. documents
  * if no file is provided, it reads from standard input.
  *
+ * NOTE: Works only with tidy for PHP 4.3.x, for tidy in PHP 5 see cleanhtml5.php
+ *
  * By: John Coggeshall [EMAIL PROTECTED]
  *
  * Usage: php cleanhtml.php [filename]
Index: php-src/ext/tidy/examples/urlgrab.php
diff -u php-src/ext/tidy/examples/urlgrab.php:1.2 
php-src/ext/tidy/examples/urlgrab.php:1.3
--- php-src/ext/tidy/examples/urlgrab.php:1.2   Mon Sep 22 14:40:37 2003
+++ php-src/ext/tidy/examples/urlgrab.php   Sat Jan  3 00:23:23 2004
@@ -6,6 +6,8 @@
  * A simple command-line utility to extract all of the URLS contained
  * within A HREF tags from a document.
  *
+ * NOTE: Only works with tidy for PHP 4.3.x, please see urlgrab5.php for tidy for 
PHP 5
+ *
  * By: John Coggeshall [EMAIL PROTECTED]
  *
  * Usage: php urlgrab.php file
Index: php-src/ext/tidy/tests/007.phpt
diff -u php-src/ext/tidy/tests/007.phpt:1.4 php-src/ext/tidy/tests/007.phpt:1.5
--- php-src/ext/tidy/tests/007.phpt:1.4 Fri Dec 19 09:24:04 2003
+++ php-src/ext/tidy/tests/007.phpt Sat Jan  3 00:23:24 2004
@@ -23,6 +23,9 @@
$a-setopt(tab-size, 10);
echo \nNew Value of 'tab-size': ;
var_dump($a-getopt(tab-size));
+   tidy_setopt($a, tab-size, 12);
+   echo \nNew Value of 'tab-size': ;
+   var_dump(tidy_getopt($a, tab-size));
} else {
echo Current Value of 'tidy-mark': ;
var_dump(tidy_getopt(tidy-mark));
@@ -51,3 +54,5 @@
 Current Value of 'tab-size': int(8)
 
 New Value of 'tab-size': int(10)
+
+New Value of 'tab-size': int(12)

Index: php-src/ext/tidy/examples/cleanhtml5.php
+++ php-src/ext/tidy/examples/cleanhtml5.php
?php

/*
 * cleanhtml5.php
 *
 * A simple script to clean and repair HTML,XHTML,PHP,ASP,etc. documents
 * if no file is provided, it reads from standard input.
 *
 * NOTE: Works only with tidy for PHP 5, for tidy in PHP 4.3.x see cleanhtml.php
 *
 * By: John Coggeshall [EMAIL PROTECTED]
 *
 * Usage: php cleanhtml5.php [filename]
 *
 */

if(!isset($_SERVER['argv'][1])) {
  $data = file_get_contents(php://stdin);
  $tidy = tidy_parse_string($data);
} else {
  $tidy = tidy_parse_file($_SERVER['argv'][1]);
}

$tidy-clean_repair();

if(!empty($tidy-error_buf)) {

echo \n\nThe following errors or warnings occured:\n;
echo {$tidy-error_buf}\n;

}

echo $tidy;

?


 
 
Index: php-src/ext/tidy/examples/dumpit5.php
+++ php-src/ext/tidy/examples/dumpit5.php
?php
/*
 * dumpit5.php
 *
 * a command-line script which dumps the given HTML, PHP, ASP, XHTML, etc.
 * file as it is represented in the document model.
 *
 * NOTE: Only works with tidy for PHP 5+, for tidy in 4.3.x, see dumpit.php
 *
 * By: John Coggeshall [EMAIL PROTECTED]
 *
 * Usage; php dumpit5.php filename
 */

$tidy = tidy_parse_file($_SERVER['argv'][1]);

/* Optionally you can do this here if you want to fix up the document */

/* $tidy-clean_repair() */
  
$tree = $tidy-root();
dump_tree($tree);
echo \n;

function node_type($type) {

switch($type) {

case TIDY_NODETYPE_ROOT: return Root Node;
case TIDY_NODETYPE_DOCTYPE: return DocType Node;
case TIDY_NODETYPE_COMMENT: return Comment Node;
case TIDY_NODETYPE_PROCINS: return ProcIns Node;
case TIDY_NODETYPE_TEXT: return Text Node;
case TIDY_NODETYPE_START: return Start Node;
case TIDY_NODETYPE_END: return End Node;
case TIDY_NODETYPE_STARTEND: return Start/End Node;
case TIDY_NODETYPE_CDATA: return CDATA Node;
case TIDY_NODETYPE_SECTION: return Section Node;
case TIDY_NODETYPE_ASP: return ASP Source Code Node;
case TIDY_NODETYPE_PHP: return PHP Source Code Node;
case