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

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 10:50:19 2006 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  Remove duplicate 'wrong param count' warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.112r2=1.113diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.112 php-src/ext/spl/spl_array.c:1.113
--- php-src/ext/spl/spl_array.c:1.112   Fri Aug 11 17:06:19 2006
+++ php-src/ext/spl/spl_array.c Sun Oct  8 10:50:19 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.112 2006/08/11 17:06:19 nlopess Exp $ */
+/* $Id: spl_array.c,v 1.113 2006/10/08 10:50:19 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -1004,7 +1004,7 @@
zend_hash_copy(HASH_OF(return_value), spl_array_get_hash_table(intern, 
0 TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, tmp, sizeof(zval*));

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z, array) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   return;
}
if (Z_TYPE_PP(array) == IS_OBJECT  intern == 
(spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) {
zval_ptr_dtor(intern-array);

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



[PHP-CVS] cvs: php-src /ext/gd/tests gif.phpt

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 13:43:20 2006 UTC

  Modified files:  
/php-src/ext/gd/tests   gif.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/gd/tests/gif.phpt
diff -u php-src/ext/gd/tests/gif.phpt:1.2 php-src/ext/gd/tests/gif.phpt:1.3
--- php-src/ext/gd/tests/gif.phpt:1.2   Mon Dec 26 21:41:37 2005
+++ php-src/ext/gd/tests/gif.phpt   Sun Oct  8 13:43:20 2006
@@ -2,7 +2,7 @@
 gif in/out
 --SKIPIF--
 ?php 
-// $Id: gif.phpt,v 1.2 2005/12/26 21:41:37 pajoye Exp $
+// $Id: gif.phpt,v 1.3 2006/10/08 13:43:20 bjori Exp $
if (!extension_loaded('gd')) {
die(skip gd extension not available.);
}
@@ -133,6 +133,7 @@
 }
 
 @unlink($cwd . /test_gif.gif);
[EMAIL PROTECTED]($cwd . /test_gif_2.gif);
 ?
 --EXPECT--
 4 cols: ok

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



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

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 13:49:58 2006 UTC

  Modified files:  
/php-src/ext/filter filter.c 
  Log:
  Error message cleanup (patch by  Matt W (php_lists -AT- realpain.com))
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.70 php-src/ext/filter/filter.c:1.71
--- php-src/ext/filter/filter.c:1.70Wed Oct  4 11:56:15 2006
+++ php-src/ext/filter/filter.c Sun Oct  8 13:49:57 2006
@@ -19,7 +19,7 @@
   +--+
 */
 
-/* $Id: filter.c,v 1.70 2006/10/04 11:56:15 pajoye Exp $ */
+/* $Id: filter.c,v 1.71 2006/10/08 13:49:57 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -273,7 +273,7 @@
 {
php_info_print_table_start();
php_info_print_table_row( 2, Input Validation and Filtering, 
enabled );
-   php_info_print_table_row( 2, Revision, $Revision: 1.70 $);
+   php_info_print_table_row( 2, Revision, $Revision: 1.71 $);
php_info_print_table_end();
 
DISPLAY_INI_ENTRIES();
@@ -622,7 +622,7 @@
zend_hash_move_forward_ex(Z_ARRVAL_PP(op), pos))
{
if (zend_hash_get_current_key_ex(Z_ARRVAL_PP(op), 
arg_key, arg_key_len, index, 0, pos) != HASH_KEY_IS_STRING) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric keys are not allowed in the definition array.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Numeric keys are not allowed in the definition array);
zval_dtor(return_value);
RETURN_FALSE;
}

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



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

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 15:27:28 2006 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  Fix wrong param count error message
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.358r2=1.359diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.358 php-src/ext/gd/gd.c:1.359
--- php-src/ext/gd/gd.c:1.358   Sat Oct  7 18:12:04 2006
+++ php-src/ext/gd/gd.c Sun Oct  8 15:27:28 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.358 2006/10/07 18:12:04 iliaa Exp $ */
+/* $Id: gd.c,v 1.359 2006/10/08 15:27:28 bjori Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4509,8 +4509,10 @@
php_image_filter_smooth
};
 
-   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  5 || 
zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) == FAILURE) {
-   ZEND_WRONG_PARAM_COUNT();
+   if (ZEND_NUM_ARGS()  2 || ZEND_NUM_ARGS()  5) {
+   WRONG_PARAM_COUNT;
+   } else if (zend_parse_parameters(2 TSRMLS_CC, rl, tmp, filtertype) 
== FAILURE) {
+   return;
}
 
if (filtertype = 0  filtertype = IMAGE_FILTER_MAX) {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd_ctx.c /ext/gd/tests bug39082.phpt

2006-10-08 Thread Pierre-Alain Joye
pajoye  Sun Oct  8 17:36:10 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/gd/tests   bug39082.phpt 

  Modified files:  
/php-src/ext/gd gd_ctx.c 
  Log:
  - #39082, image* segfaults when used with only one argument
(introduced in 5.2+, no news entry)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd_ctx.c?r1=1.22.2.5.2.1r2=1.22.2.5.2.2diff_format=u
Index: php-src/ext/gd/gd_ctx.c
diff -u php-src/ext/gd/gd_ctx.c:1.22.2.5.2.1 
php-src/ext/gd/gd_ctx.c:1.22.2.5.2.2
--- php-src/ext/gd/gd_ctx.c:1.22.2.5.2.1Tue Aug  1 22:42:11 2006
+++ php-src/ext/gd/gd_ctx.c Sun Oct  8 17:36:10 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: gd_ctx.c,v 1.22.2.5.2.1 2006/08/01 22:42:11 tony2001 Exp $ */
+/* $Id: gd_ctx.c,v 1.22.2.5.2.2 2006/10/08 17:36:10 pajoye Exp $ */
 
 #include php_gd.h
 
@@ -75,7 +75,9 @@
ZEND_FETCH_RESOURCE(im, gdImagePtr, imgind, -1, Image, 
phpi_get_le_gd());
 
if (argc  1) {
-   convert_to_string_ex(file);
+   if (argc = 2  Z_TYPE_PP(file) != IS_NULL) {
+   convert_to_string_ex(file);
+   }
fn = Z_STRVAL_PP(file);
if (argc = 3) {
convert_to_long_ex(quality);
@@ -87,7 +89,7 @@
}
}
 
-   if ((argc == 2) || (argc  2  Z_STRLEN_PP(file))) {
+   if (argc  1  (Z_TYPE_PP(file) != IS_NULL  ((argc == 2) || (argc  
2  Z_STRLEN_PP(file) {
 
PHP_GD_CHECK_OPEN_BASEDIR(fn, Invalid filename);
 

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39082.phpt?view=markuprev=1.1
Index: php-src/ext/gd/tests/bug39082.phpt
+++ php-src/ext/gd/tests/bug39082.phpt

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



[PHP-CVS] cvs: php-src /ext/gd gd_ctx.c /ext/gd/tests bug39082.phpt

2006-10-08 Thread Pierre-Alain Joye
pajoye  Sun Oct  8 17:42:55 2006 UTC

  Modified files:  
/php-src/ext/gd gd_ctx.c 
/php-src/ext/gd/tests   bug39082.phpt 
  Log:
  - MFB: #39082, image* segfaults when used with only one argument
   (introduced in 5.2+, no news entry)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd_ctx.c?r1=1.30r2=1.31diff_format=u
Index: php-src/ext/gd/gd_ctx.c
diff -u php-src/ext/gd/gd_ctx.c:1.30 php-src/ext/gd/gd_ctx.c:1.31
--- php-src/ext/gd/gd_ctx.c:1.30Tue Aug  1 22:41:33 2006
+++ php-src/ext/gd/gd_ctx.c Sun Oct  8 17:42:55 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: gd_ctx.c,v 1.30 2006/08/01 22:41:33 tony2001 Exp $ */
+/* $Id: gd_ctx.c,v 1.31 2006/10/08 17:42:55 pajoye Exp $ */
 
 #include php_gd.h
 
@@ -74,7 +74,9 @@
ZEND_FETCH_RESOURCE(im, gdImagePtr, imgind, -1, Image, 
phpi_get_le_gd());
 
if (argc  1) {
-   convert_to_string_ex(file);
+if (argc = 2  Z_TYPE_PP(file) != IS_NULL) {
+   convert_to_string_ex(file);
+   }
fn = Z_STRVAL_PP(file);
if (argc = 3) {
convert_to_long_ex(quality);
@@ -86,8 +88,7 @@
}
}
 
-   if ((argc == 2) || (argc  2  Z_STRLEN_PP(file))) {
-
+if (argc  1  (Z_TYPE_PP(file) != IS_NULL  ((argc == 2) || (argc  2 
 Z_STRLEN_PP(file) {
PHP_GD_CHECK_OPEN_BASEDIR(fn, Invalid filename);
 
fp = VCWD_FOPEN(fn, wb);
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39082.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/gd/tests/bug39082.phpt
diff -u /dev/null php-src/ext/gd/tests/bug39082.phpt:1.2
--- /dev/null   Sun Oct  8 17:42:55 2006
+++ php-src/ext/gd/tests/bug39082.phpt  Sun Oct  8 17:42:55 2006
@@ -0,0 +1,18 @@
+--TEST--
+Bug #39082 (Output image to stdout segfaults).
+--SKIPIF--
+?php 
+   if (!extension_loaded('gd')) {  
+   die(skip gd extension not available\n);
+   }
+   if (!GD_BUNDLED) {
+   die('skip external GD libraries may fail');
+   }
+?
+--FILE--
+?php
+$im = imagecreatetruecolor(1,1);
+imagegif($im);
+?
+--EXPECTF--
+GIF87a%s

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



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

2006-10-08 Thread Sara Golemon
pollita Sun Oct  8 18:00:44 2006 UTC

  Modified files:  
/php-src/ext/standard   type.c 
  Log:
  Fix win32 (again), just temporarily convert the classname to ascii on this 
platform...
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.46r2=1.47diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.46 php-src/ext/standard/type.c:1.47
--- php-src/ext/standard/type.c:1.46Sat Oct  7 04:45:42 2006
+++ php-src/ext/standard/type.c Sun Oct  8 18:00:44 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: type.c,v 1.46 2006/10/07 04:45:42 pollita Exp $ */
+/* $Id: type.c,v 1.47 2006/10/08 18:00:44 pollita Exp $ */
 
 #include php.h
 #include php_incomplete_class.h
@@ -238,12 +238,25 @@
/* We can get away with this because 
INCOMPLETE_CLASS is ascii and has a 1:1 relationship with unicode */
RETURN_TRUE;
} else if (UG(unicode)) {
+#ifndef PHP_WIN32
U_STRING_DECL(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
U_STRING_INIT(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
 
if (!memcmp(ce-name.u, uIncompleteClass, 
UBYTES(sizeof(INCOMPLETE_CLASS {
RETURN_FALSE;
}
+#else /* WIN32 -- U_STRING_DECL breaks under Win32 with string macros */
+   char *ascii_name = 
zend_unicode_to_ascii(ce-name.u, ce-name_length TSRSMLS_CC);
+
+   if (ascii_name) {
+   if (memcmp(INCOMPLETE_CLASS, 
ascii_name, sizeof(INCOMPLETE_CLASS) - 1) == 0) {
+   efree(ascii_name);
+   RETURN_FALSE;
+   }
+   efree(ascii_name);
+   }
+   /* Non-ascii class name means it can't be 
INCOMPLETE_CLASS and is therefore okay */
+#endif
} else {
if (!memcmp(ce-name.s, INCOMPLETE_CLASS, 
sizeof(INCOMPLETE_CLASS))) {
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 type.c

2006-10-08 Thread Edin Kadribasic
According to U_STRING_DECL documentation the second arg can only be a 
string literal, so I guess coding for undocumented behavior is not 
should be avoided on all platforms.


Edin

Sara Golemon wrote:

pollita Sun Oct  8 18:00:44 2006 UTC

  Modified files:  
/php-src/ext/standard	type.c 
  Log:

  Fix win32 (again), just temporarily convert the classname to ascii on this 
platform...
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.46r2=1.47diff_format=u

Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.46 php-src/ext/standard/type.c:1.47
--- php-src/ext/standard/type.c:1.46Sat Oct  7 04:45:42 2006
+++ php-src/ext/standard/type.c Sun Oct  8 18:00:44 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: type.c,v 1.46 2006/10/07 04:45:42 pollita Exp $ */

+/* $Id: type.c,v 1.47 2006/10/08 18:00:44 pollita Exp $ */
 
 #include php.h

 #include php_incomplete_class.h
@@ -238,12 +238,25 @@
/* We can get away with this because 
INCOMPLETE_CLASS is ascii and has a 1:1 relationship with unicode */
RETURN_TRUE;
} else if (UG(unicode)) {
+#ifndef PHP_WIN32
U_STRING_DECL(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
U_STRING_INIT(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
 
 if (!memcmp(ce-name.u, uIncompleteClass, UBYTES(sizeof(INCOMPLETE_CLASS {

RETURN_FALSE;
}
+#else /* WIN32 -- U_STRING_DECL breaks under Win32 with string macros */
+   char *ascii_name = 
zend_unicode_to_ascii(ce-name.u, ce-name_length TSRSMLS_CC);
+
+   if (ascii_name) {
+   if (memcmp(INCOMPLETE_CLASS, 
ascii_name, sizeof(INCOMPLETE_CLASS) - 1) == 0) {
+   efree(ascii_name);
+   RETURN_FALSE;
+   }
+   efree(ascii_name);
+   }
+   /* Non-ascii class name means it can't be 
INCOMPLETE_CLASS and is therefore okay */
+#endif
} else {
if (!memcmp(ce-name.s, INCOMPLETE_CLASS, 
sizeof(INCOMPLETE_CLASS))) {
RETURN_FALSE;



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



[PHP-CVS] cvs: php-src /ext/standard/tests/array locale_sort.phpt

2006-10-08 Thread Hannes Magnusson
bjori   Sun Oct  8 20:06:05 2006 UTC

  Modified files:  
/php-src/ext/standard/tests/array   locale_sort.phpt 
  Log:
  Fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/locale_sort.phpt?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/standard/tests/array/locale_sort.phpt
diff -u php-src/ext/standard/tests/array/locale_sort.phpt:1.5 
php-src/ext/standard/tests/array/locale_sort.phpt:1.6
--- php-src/ext/standard/tests/array/locale_sort.phpt:1.5   Fri Jan  6 
21:21:09 2006
+++ php-src/ext/standard/tests/array/locale_sort.phpt   Sun Oct  8 20:06:04 2006
@@ -5,8 +5,8 @@
 if (fr_FR != setlocale(LC_CTYPE, fr_FR)) {
   die(skip setlocale() failed\n);
 }
-if (!function_exists(i18n_loc_set_default)) {
-  die(skip no i18n_loc_set_default() function\n);
+if (!function_exists(locale_set_default)) {
+  die(sip locale_set_default() function\n);
 }
 ?
 --INI--
@@ -15,7 +15,7 @@
 --FILE--
 ?php
 setlocale(LC_ALL, 'fr_FR');
-i18n_loc_set_default('fr_FR');
+locale_set_default('fr_FR');
 $table = array(AB = Alberta,
 BC = Colombie-Britannique,
 MB = Manitoba,

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl interface.c

2006-10-08 Thread Ilia Alshanetsky
iliaa   Sun Oct  8 22:38:48 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/curl   interface.c 
  Log:
  Added missing configuration checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.10r2=1.62.2.14.2.11diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.10 
php-src/ext/curl/interface.c:1.62.2.14.2.11
--- php-src/ext/curl/interface.c:1.62.2.14.2.10 Mon Sep 18 16:11:50 2006
+++ php-src/ext/curl/interface.cSun Oct  8 22:38:48 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.10 2006/09/18 16:11:50 iliaa Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.11 2006/10/08 22:38:48 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -563,9 +563,13 @@
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
+#if LIBCURL_VERSION_NUM = 0x070a08
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
+#endif
+#if LIBCURL_VERSION_NUM = 0x070b00
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
+#endif
 
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);

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



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

2006-10-08 Thread Ilia Alshanetsky
iliaa   Sun Oct  8 22:39:48 2006 UTC

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  MFB: Added missing configuration checks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.91r2=1.92diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.91 php-src/ext/curl/interface.c:1.92
--- php-src/ext/curl/interface.c:1.91   Sun Oct  8 13:34:21 2006
+++ php-src/ext/curl/interface.cSun Oct  8 22:39:48 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.91 2006/10/08 13:34:21 bjori Exp $ */
+/* $Id: interface.c,v 1.92 2006/10/08 22:39:48 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -561,9 +561,13 @@
REGISTER_CURL_CONSTANT(CURLE_SSL_CIPHER);
REGISTER_CURL_CONSTANT(CURLE_SSL_CACERT);
REGISTER_CURL_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
+#if LIBCURL_VERSION_NUM = 0x070a08
REGISTER_CURL_CONSTANT(CURLE_LDAP_INVALID_URL);
REGISTER_CURL_CONSTANT(CURLE_FILESIZE_EXCEEDED);
+#endif
+#if LIBCURL_VERSION_NUM = 0x070b00
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
+#endif
 
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/openssl openssl.c

2006-10-08 Thread Pierre-Alain Joye
pajoye  Mon Oct  9 00:04:10 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/opensslopenssl.c 
  Log:
  - fix possible segfault (see test 004) always exists and returns NULL on
error
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.21r2=1.98.2.5.2.22diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.21 
php-src/ext/openssl/openssl.c:1.98.2.5.2.22
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.21 Sat Sep 16 12:05:12 2006
+++ php-src/ext/openssl/openssl.c   Mon Oct  9 00:04:10 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.21 2006/09/16 12:05:12 nlopess Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.22 2006/10/09 00:04:10 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1890,8 +1890,8 @@
 #define TMP_CLEAN \
if (Z_TYPE(tmp) == IS_STRING) {\
zval_dtor(tmp); \
-   return NULL; \
-   }
+   } \
+   return NULL;
 
if (resourceval) {
*resourceval = -1;

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



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

2006-10-08 Thread Pierre-Alain Joye
pajoye  Mon Oct  9 00:06:40 2006 UTC

  Modified files:  
/php-src/ext/opensslopenssl.c 
  Log:
  - MFB: fix possible segfault (see test 004) always exists and returns NULL 
on error (thx Bjori for the head up)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.125r2=1.126diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.125 php-src/ext/openssl/openssl.c:1.126
--- php-src/ext/openssl/openssl.c:1.125 Sun Oct  8 13:34:23 2006
+++ php-src/ext/openssl/openssl.c   Mon Oct  9 00:06:40 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.125 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: openssl.c,v 1.126 2006/10/09 00:06:40 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1801,8 +1801,8 @@
 #define TMP_CLEAN \
if (Z_TYPE(tmp) == IS_STRING) {\
zval_dtor(tmp); \
-   return NULL; \
-   }
+   } \
+   return NULL;
 
if (resourceval) {
*resourceval = -1;

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



[PHP-CVS] cvs: php-src / NEWS /ext/standard basic_functions.c streamsfuncs.c streamsfuncs.h

2006-10-08 Thread Sara Golemon
pollita Mon Oct  9 02:48:06 2006 UTC

  Modified files:  
/php-src/ext/standard   basic_functions.c streamsfuncs.c 
streamsfuncs.h 
/php-srcNEWS 
  Log:
  Add stream_resolve_include_path()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.810r2=1.811diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.810 
php-src/ext/standard/basic_functions.c:1.811
--- php-src/ext/standard/basic_functions.c:1.810Sun Oct  8 13:34:23 2006
+++ php-src/ext/standard/basic_functions.c  Mon Oct  9 02:48:06 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.810 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: basic_functions.c,v 1.811 2006/10/09 02:48:06 pollita Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2443,6 +2443,12 @@
ZEND_ARG_INFO(0, stream)
ZEND_ARG_INFO(0, encoding)
 ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_resolve_include_path, 0, 0, 1)
+   ZEND_ARG_INFO(0, filename)
+   ZEND_ARG_INFO(0, context)
+ZEND_END_ARG_INFO()
 /* }}} */
 /* {{{ string.c */
 static
@@ -3553,6 +3559,7 @@
 #endif
PHP_FE(stream_copy_to_stream,   
arginfo_stream_copy_to_stream)
PHP_FE(stream_get_contents, 
arginfo_stream_get_contents)
+   PHP_FE(stream_resolve_include_path, 
arginfo_stream_resolve_include_path)
PHP_FE(fgetcsv, 
arginfo_fgetcsv)
PHP_FE(fputcsv, 
arginfo_fputcsv)
PHP_FE(flock,   
arginfo_flock)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.94r2=1.95diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.94 
php-src/ext/standard/streamsfuncs.c:1.95
--- php-src/ext/standard/streamsfuncs.c:1.94Sun Oct  8 13:34:23 2006
+++ php-src/ext/standard/streamsfuncs.c Mon Oct  9 02:48:06 2006
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: streamsfuncs.c,v 1.94 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: streamsfuncs.c,v 1.95 2006/10/09 02:48:06 pollita Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -1579,6 +1579,72 @@
 }
 /* }}} */
 
+/* {{{ proto string stream_resolve_include_path(string filename[, resource 
context]) U
+Determine what file will be opened by calls to fopen() with a relative path */
+PHP_FUNCTION(stream_resolve_include_path)
+{
+   zval **ppfilename, *zcontext = NULL;
+   char *filename, *ptr = PG(include_path), *end = ptr + (ptr ? 
strlen(ptr) : 0), buffer[MAXPATHLEN];
+   int filename_len;
+   php_stream_context *context = NULL;
+   struct stat sb;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, Z|r, 
ppfilename, zcontext) == FAILURE ||
+   php_stream_path_param_encode(ppfilename, filename, 
filename_len, REPORT_ERRORS, context = php_stream_context_from_zval(zcontext, 
0)) == FAILURE) {
+   return;
+   }
+
+   while (ptr  end) {
+   char *s = strchr(ptr, DEFAULT_DIR_SEPARATOR);
+
+   if (!s) {
+   s = end;
+   }
+
+   if (s == ptr) {
+   ptr++;
+   continue;
+   }
+
+   if ((s - ptr) + 1 + filename_len = MAXPATHLEN) {
+   /* Too long to try */
+   ptr = s + 1;
+   continue;
+   }
+
+   memcpy(buffer, ptr, s - ptr);
+   buffer[s - ptr] = '/';
+   memcpy(buffer + (s - ptr) + 1, filename, filename_len + 1);
+
+   if (php_check_open_basedir_ex(buffer, 0 TSRMLS_CC)) {
+   ptr = s + 1;
+   continue;
+   }
+
+   if (VCWD_STAT(buffer, sb)) {
+   ptr = s + 1;
+   continue;
+   }
+
+   if (UG(unicode)) {
+   UChar *upath;
+   int upath_len;
+
+   if (SUCCESS == php_stream_path_decode(NULL, upath, 
upath_len, buffer, (s - ptr) + 1 + filename_len, REPORT_ERRORS, context)) {
+   RETURN_UNICODEL(upath, upath_len, 0);
+   } else {
+ 

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

2006-10-08 Thread Sara Golemon
pollita Mon Oct  9 02:52:27 2006 UTC

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  Fix realpath() in unicode mode
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.462r2=1.463diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.462 php-src/ext/standard/file.c:1.463
--- php-src/ext/standard/file.c:1.462   Sun Oct  8 13:34:23 2006
+++ php-src/ext/standard/file.c Mon Oct  9 02:52:27 2006
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.462 2006/10/08 13:34:23 bjori Exp $ */
+/* $Id: file.c,v 1.463 2006/10/09 02:52:27 pollita Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -2432,10 +2432,11 @@
UChar *path;
int path_len;
 
-   if (php_stream_path_decode(php_plain_files_wrapper, 
path, path_len, filename, filename_len, REPORT_ERRORS, FG(default_context)) 
== SUCCESS) {
+   if (php_stream_path_decode(php_plain_files_wrapper, 
path, path_len, resolved_path_buff, strlen(resolved_path_buff), 
REPORT_ERRORS, FG(default_context)) == SUCCESS) {
RETVAL_UNICODEL(path, path_len, 0);
} else {
-   RETVAL_FALSE;
+   /* Fallback */
+   RETVAL_STRING(resolved_path_buff, 1);
}
} else {
RETVAL_STRING(resolved_path_buff, 1);

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



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

2006-10-08 Thread Sara Golemon
pollita Mon Oct  9 02:55:38 2006 UTC

  Modified files:  
/php-src/ext/standard   type.c 
  Log:
  Oi
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.47r2=1.48diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.47 php-src/ext/standard/type.c:1.48
--- php-src/ext/standard/type.c:1.47Sun Oct  8 18:00:44 2006
+++ php-src/ext/standard/type.c Mon Oct  9 02:55:38 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: type.c,v 1.47 2006/10/08 18:00:44 pollita Exp $ */
+/* $Id: type.c,v 1.48 2006/10/09 02:55:38 pollita Exp $ */
 
 #include php.h
 #include php_incomplete_class.h
@@ -246,7 +246,7 @@
RETURN_FALSE;
}
 #else /* WIN32 -- U_STRING_DECL breaks under Win32 with string macros */
-   char *ascii_name = 
zend_unicode_to_ascii(ce-name.u, ce-name_length TSRSMLS_CC);
+   char *ascii_name = 
zend_unicode_to_ascii(ce-name.u, ce-name_length TSRMLS_CC);
 
if (ascii_name) {
if (memcmp(INCOMPLETE_CLASS, 
ascii_name, sizeof(INCOMPLETE_CLASS) - 1) == 0) {

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



[PHP-CVS] cvs: php-src /ext/mysqli config.m4

2006-10-08 Thread Georg Richter
georg   Mon Oct  9 04:46:03 2006 UTC

  Modified files:  
/php-src/ext/mysqli config.m4 
  Log:
  Fix for bug #39085:
  PHP6 requires mysqli_set_character_set function which was introduced in 
  MySQL 4.1.13 and 5.0.7
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/config.m4?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.24 php-src/ext/mysqli/config.m4:1.25
--- php-src/ext/mysqli/config.m4:1.24   Thu Jun  1 19:15:31 2006
+++ php-src/ext/mysqli/config.m4Mon Oct  9 04:46:03 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.24 2006/06/01 19:15:31 mike Exp $
+dnl $Id: config.m4,v 1.25 2006/10/09 04:46:03 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -49,9 +49,9 @@
 PHP_EVAL_INCLINE($MYSQLI_INCLINE)
 PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
 AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
-PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_stmt_field_count,
+PHP_CHECK_LIBRARY($MYSQL_LIB_NAME, mysql_set_character_set,
 [ ],[
-   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.3 (for 
MySQL 4.1.x) and  5.0.1 for (MySQL 5.0.x) anymore. Please update your 
libraries.])
+   AC_MSG_ERROR([MySQLI doesn't support versions  4.1.13 (for 
MySQL 4.1.x) and  5.0.7 for (MySQL 5.0.x) anymore. Please update your 
libraries.])
],[$MYSQLI_LIBLINE])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check 
config.log for more information.])

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