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

2009-06-20 Thread Kalle Sommer Nielsen
kalle   Sat Jun 20 06:07:36 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Fixed arginfo for array_map, patch by Matthew Fonda 
matthewfo...@gmail.com
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.91r2=1.725.2.31.2.64.2.92diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.91 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.92
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.91 Mon Jun 15 
08:32:38 2009
+++ php-src/ext/standard/basic_functions.c  Sat Jun 20 06:07:35 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.91 2009/06/15 08:32:38 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.92 2009/06/20 06:07:35 kalle Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -589,10 +589,9 @@
ZEND_ARG_INFO(0, callback)
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 3)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_array_map, 0, 0, 2)
ZEND_ARG_INFO(0, callback)
-   ZEND_ARG_INFO(0, arg1) /* ARRAY_INFO(0, arg1, 0) */
-   ZEND_ARG_INFO(0, arg2) /* ARRAY_INFO(0, arg2, 0) */
+   ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_INFO(0, ...)
 ZEND_END_ARG_INFO()
 



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



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

2009-06-15 Thread Pierre-Alain Joye
pajoye  Mon Jun 15 08:32:38 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - silent warning
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.90r2=1.725.2.31.2.64.2.91diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.90 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.91
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.90 Sat Jun  6 
02:40:48 2009
+++ php-src/ext/standard/basic_functions.c  Mon Jun 15 08:32:38 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.90 2009/06/06 02:40:48 mattwil 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.91 2009/06/15 08:32:38 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4173,7 +4173,7 @@
 static int parse_opts(char * opts, opt_struct ** result)
 {
opt_struct * paras = NULL;
-   int i, count = 0;
+   unsigned int i, count = 0;
 
for (i = 0; i  strlen(opts); i++) {
if ((opts[i] = 48  opts[i] = 57) ||



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /win32 time.c time.h unistd.h /win32/build config.w32.h.in

2009-01-18 Thread Pierre-Alain Joye
pajoye  Mon Jan 19 02:35:22 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/win32/buildconfig.w32.h.in 
/php-src/win32  time.c time.h unistd.h 
  Log:
  - MFH:
   - add nanosleep
   - expose nanosleep and usleep
   - [DOC] time_ nanosleep and time_ sleep_ until available on windows
   - change nanosleep signature to match posix one
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.85r2=1.725.2.31.2.64.2.86diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.85 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.86
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.85 Fri Jan 16 
01:01:04 2009
+++ php-src/ext/standard/basic_functions.c  Mon Jan 19 02:35:21 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.85 2009/01/16 01:01:04 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.86 2009/01/19 02:35:21 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -39,6 +39,7 @@
 
 #ifdef PHP_WIN32
 #include win32/php_win32_globals.h
+#include win32/time.h
 #endif
 
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.7.2.4.2.3.2.7r2=1.7.2.4.2.3.2.8diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.7 
php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.8
--- php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.7 Wed Dec 31 19:47:13 2008
+++ php-src/win32/build/config.w32.h.in Mon Jan 19 02:35:21 2009
@@ -1,6 +1,6 @@
 /*
Build Configuration Template for Win32.
-   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.7 2008/12/31 19:47:13 pajoye Exp $
+   $Id: config.w32.h.in,v 1.7.2.4.2.3.2.8 2009/01/19 02:35:21 pajoye Exp $
 */
 
 /* Define the minimum supported version */
@@ -53,6 +53,7 @@
 
 /* its in win32/time.c */
 #define HAVE_USLEEP 1
+#define HAVE_NANOSLEEP 1
 
 #define HAVE_GETHOSTNAME 1
 #define HAVE_GETCWD 1
http://cvs.php.net/viewvc.cgi/php-src/win32/time.c?r1=1.10.6.2r2=1.10.6.3diff_format=u
Index: php-src/win32/time.c
diff -u php-src/win32/time.c:1.10.6.2 php-src/win32/time.c:1.10.6.3
--- php-src/win32/time.c:1.10.6.2   Thu Aug 14 23:29:25 2008
+++ php-src/win32/time.cMon Jan 19 02:35:21 2009
@@ -11,7 +11,7 @@
  *
  */
 
-/* $Id: time.c,v 1.10.6.2 2008/08/14 23:29:25 kalle Exp $ */
+/* $Id: time.c,v 1.10.6.3 2009/01/19 02:35:21 pajoye Exp $ */
 
  /**
   *
@@ -127,7 +127,7 @@
return 0;
 }
 
-void usleep(unsigned int useconds)
+PHPAPI int usleep(unsigned int useconds)
 {
HANDLE timer;
LARGE_INTEGER due;
@@ -138,6 +138,17 @@
SetWaitableTimer(timer, due, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
+   return 0;
+}
+
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp )
+{
+   if (rqtp-tv_nsec  9) {
+   /* The time interval specified 1,000,000 or more microseconds. 
*/
+   errno = EINVAL;
+   return -1;
+   }
+   return usleep( rqtp-tv_sec * 100 + rqtp-tv_nsec / 1000  );
 }
 
 #if 0 /* looks pretty ropey in here */
http://cvs.php.net/viewvc.cgi/php-src/win32/time.h?r1=1.9r2=1.9.8.1diff_format=u
Index: php-src/win32/time.h
diff -u php-src/win32/time.h:1.9 php-src/win32/time.h:1.9.8.1
--- php-src/win32/time.h:1.9Tue Feb 18 13:34:52 2003
+++ php-src/win32/time.hMon Jan 19 02:35:22 2009
@@ -28,6 +28,14 @@
struct timeval it_value;/* current value */
 };
 
+#ifndef timespec
+struct timespec
+{
+   time_t   tv_sec;   /* seconds */
+   long tv_nsec;  /* nanoseconds */
+};
+#endif
+
 #define ITIMER_REAL0   /*generates sigalrm */
 #define ITIMER_VIRTUAL 1   /*generates sigvtalrm */
 #define ITIMER_VIRT1   /*generates sigvtalrm */
@@ -40,4 +48,6 @@
 PHPAPI extern int setitimer(int which, const struct itimerval *value,
 struct itimerval *ovalue);
 
+PHPAPI int nanosleep( const struct timespec * rqtp, struct timespec * rmtp );
+
 #endif
http://cvs.php.net/viewvc.cgi/php-src/win32/unistd.h?r1=1.2r2=1.2.30.1diff_format=u
Index: php-src/win32/unistd.h
diff -u php-src/win32/unistd.h:1.2 php-src/win32/unistd.h:1.2.30.1
--- php-src/win32/unistd.h:1.2  Thu Jun 28 23:28:25 2001
+++ php-src/win32/unistd.h  Mon Jan 19 02:35:22 2009
@@ -1,4 +1,4 @@
 #ifndef _PHP_WIN32_UNISTD_H
 #define _PHP_WIN32_UNISTD_H
-void usleep(unsigned int useconds);
+PHPAPI int usleep(unsigned int useconds);
 #endif



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

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

2009-01-15 Thread Pierre-Alain Joye
pajoye  Fri Jan 16 01:01:04 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - symlink, hardlink  co support (2.1/2 :)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.84r2=1.725.2.31.2.64.2.85diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.84 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.85
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.84 Tue Jan 13 
21:29:12 2009
+++ php-src/ext/standard/basic_functions.c  Fri Jan 16 01:01:04 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.84 2009/01/13 21:29:12 iliaa Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.85 2009/01/16 01:01:04 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1590,7 +1590,7 @@
 ZEND_END_ARG_INFO()
 /* }}} */
 /* {{{ link.c */
-#ifdef HAVE_SYMLINK
+#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
 ZEND_BEGIN_ARG_INFO(arginfo_readlink, 0)
ZEND_ARG_INFO(0, filename)
 ZEND_END_ARG_INFO()
@@ -2793,7 +2793,7 @@
PHP_FE(rawurldecode,
arginfo_rawurldecode)
PHP_FE(http_build_query,
arginfo_http_build_query)
 
-#ifdef HAVE_SYMLINK
+#if defined(HAVE_SYMLINK) || defined(PHP_WIN32)
PHP_FE(readlink,
arginfo_readlink)
PHP_FE(linkinfo,
arginfo_linkinfo)
PHP_FE(symlink, 
arginfo_symlink)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c mail.c

2009-01-13 Thread Ilia Alshanetsky
iliaa   Tue Jan 13 21:29:12 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c mail.c 
  Log:
  Fixed a bug inside mail() logging code that prevents log file from existing
  outside of open_basedir
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.83r2=1.725.2.31.2.64.2.84diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.83 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.84
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.83 Wed Jan  7 
08:53:47 2009
+++ php-src/ext/standard/basic_functions.c  Tue Jan 13 21:29:12 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.83 2009/01/07 08:53:47 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.84 2009/01/13 21:29:12 iliaa Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -5360,6 +5360,7 @@
if (_CHECK_PATH(varname, varname_len, error_log) ||
_CHECK_PATH(varname, varname_len, java.class.path) ||
_CHECK_PATH(varname, varname_len, java.home) ||
+   _CHECK_PATH(varname, varname_len, mail.log) ||
_CHECK_PATH(varname, varname_len, java.library.path) 
||
_CHECK_PATH(varname, varname_len, 
vpopmail.directory)) {
if (PG(safe_mode)  (!php_checkuid(new_value, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/mail.c?r1=1.87.2.1.2.7.2.8r2=1.87.2.1.2.7.2.9diff_format=u
Index: php-src/ext/standard/mail.c
diff -u php-src/ext/standard/mail.c:1.87.2.1.2.7.2.8 
php-src/ext/standard/mail.c:1.87.2.1.2.7.2.9
--- php-src/ext/standard/mail.c:1.87.2.1.2.7.2.8Fri Jan  9 15:08:10 2009
+++ php-src/ext/standard/mail.c Tue Jan 13 21:29:12 2009
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mail.c,v 1.87.2.1.2.7.2.8 2009/01/09 15:08:10 tony2001 Exp $ */
+/* $Id: mail.c,v 1.87.2.1.2.7.2.9 2009/01/13 21:29:12 iliaa Exp $ */
 
 #include stdlib.h
 #include ctype.h
@@ -218,6 +218,8 @@
if (mail_log) {
char *tmp;
int l = spprintf(tmp, 0, mail() on [%s:%d]: To: %s -- 
Headers: %s\n, zend_get_executed_filename(TSRMLS_C), 
zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : );
+   php_stream *stream = php_stream_open_wrapper(mail_log, a, 
IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR, NULL);
+
if (hdr) { /* find all \r\n instances and replace them with 
spaces, so a log line is always one line long */ 
char *p = tmp;
while ((p = strpbrk(p, \r\n))) {
@@ -225,7 +227,10 @@
}
tmp[l - 1] = '\n';
}
-   _php_error_log(3, tmp, mail_log, NULL TSRMLS_CC);
+   if (stream) {
+   php_stream_write(stream, tmp, l);
+   php_stream_close(stream);
+   }
efree(tmp);
}
if (PG(mail_x_header)) {



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



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

2009-01-07 Thread Pierre-Alain Joye
pajoye  Wed Jan  7 08:53:48 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - remove PHP_FE(dl) (actually removing the commented PHP_FE, was commited 
with my dns patch for win)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.82r2=1.725.2.31.2.64.2.83diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.82 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.83
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.82 Tue Jan  6 
20:48:20 2009
+++ php-src/ext/standard/basic_functions.c  Wed Jan  7 08:53:47 2009
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.82 2009/01/06 20:48:20 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.83 2009/01/07 08:53:47 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3039,9 +3039,6 @@
PHP_FE(is_scalar,   
arginfo_is_scalar)
PHP_FE(is_callable, 
arginfo_is_callable)
 
-   /* functions from dl.c */
-// PHP_FE(dl,  
arginfo_dl)
-
/* functions from file.c */
PHP_FE(pclose,  
arginfo_pclose)
PHP_FE(popen,   
arginfo_popen)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c config.w32 dns.c dns.h dns_win32.c

2009-01-06 Thread Pierre-Alain Joye
pajoye  Tue Jan  6 20:48:21 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard   dns_win32.c 

  Modified files:  
/php-src/ext/standard   basic_functions.c config.w32 dns.c dns.h 
  Log:
  - [MFH]
  - [DOC] add support for all DNS function on Windows
- dns_check_record  (and its alias  checkdnsrr)
- dns_get_record
 - IPV6 specific info not available yet:
   .  info is available only on vista/2k8 for now
   . A6 info is not available
- dns_get_mx (and its alias getmxrr)
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.81r2=1.725.2.31.2.64.2.82diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.81 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.82
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.81 Wed Dec 31 
14:30:37 2008
+++ php-src/ext/standard/basic_functions.c  Tue Jan  6 20:48:20 2009
@@ -3,7 +3,7 @@
+--+
| PHP Version 5|
+--+
-   | Copyright (c) 1997-2009 The PHP Group|
+   | Copyright (c) 1997-2008 The PHP Group|
+--+
| This source file is subject to version 3.01 of the PHP license,  |
| that is bundled with this package in the file LICENSE, and is|
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.81 2008/12/31 14:30:37 iliaa Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.82 2009/01/06 20:48:20 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -996,13 +996,13 @@
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32) || 
defined(NETWARE))
+#if defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE)))
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_check_record, 0, 0, 1)
ZEND_ARG_INFO(0, host)
ZEND_ARG_INFO(0, type)
 ZEND_END_ARG_INFO()
 
-# if HAVE_DNS_FUNCS
+# if defined(PHP_WIN32) || HAVE_DNS_FUNCS
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_record, 1, 0, 1)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(0, type)
@@ -1011,15 +1011,17 @@
 ZEND_END_ARG_INFO()
 # endif
 
-# if HAVE_DN_SKIPNAME  HAVE_DN_EXPAND
+# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME  HAVE_DN_EXPAND)
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dns_get_mx, 0, 0, 2)
ZEND_ARG_INFO(0, hostname)
ZEND_ARG_INFO(1, mxhosts) /* ARRAY_INFO(1, mxhosts, 1) */
ZEND_ARG_INFO(1, weight) /* ARRAY_INFO(1, weight, 1) */
 ZEND_END_ARG_INFO()
 # endif
-#endif /* HAVE_RES_SEARCH  !(defined(__BEOS__)||defined(PHP_WIN32) || 
defined(NETWARE)) */
+
+#endif /* defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE))) */
 /* }}} */
+
 /* {{{ exec.c */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_exec, 0, 0, 1)
ZEND_ARG_INFO(0, command)
@@ -2999,14 +3001,17 @@
PHP_FE(gethostname, 
arginfo_gethostname)
 #endif
 
-#if HAVE_RES_SEARCH  !(defined(__BEOS__) || defined(PHP_WIN32) || 
defined(NETWARE))
+#if defined(PHP_WIN32) || (HAVE_RES_SEARCH  !(defined(__BEOS__) || 
defined(NETWARE)))
+
PHP_FE(dns_check_record,
arginfo_dns_check_record)
PHP_FALIAS(checkdnsrr,  dns_check_record,   
arginfo_dns_check_record)
-# if HAVE_DN_SKIPNAME  HAVE_DN_EXPAND
+
+# if defined(PHP_WIN32) || (HAVE_DN_SKIPNAME  HAVE_DN_EXPAND)
PHP_FE(dns_get_mx,  
arginfo_dns_get_mx)
-   PHP_FALIAS(getmxrr, dns_get_mx, 
arginfo_dns_get_mx)
+   PHP_FALIAS(getmxrr, dns_get_mx, 
arginfo_dns_get_mx)
 # endif
-# if HAVE_DNS_FUNCS
+
+# if defined(PHP_WIN32) || HAVE_DNS_FUNCS
PHP_FE(dns_get_record,  
arginfo_dns_get_record)
 # endif
 #endif
@@ -3034,6 +3039,9 @@
PHP_FE(is_scalar,   
arginfo_is_scalar)
PHP_FE(is_callable, 
 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c config.m4 math.c php_math.h /ext/standard/tests/math round_large_exp.phpt round_modes.phpt round_prerounding.phpt

2008-12-02 Thread Christian Seiler
cseiler Tue Dec  2 16:27:15 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/mathround_large_exp.phpt 
round_modes.phpt 
round_prerounding.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c config.m4 math.c php_math.h 
  Log:
  - MFH: Implemented http://wiki.php.net/rfc/rounding
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.77r2=1.725.2.31.2.64.2.78diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.77 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.78
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.77 Sat Nov 29 
00:44:33 2008
+++ php-src/ext/standard/basic_functions.c  Tue Dec  2 16:27:14 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.77 2008/11/29 00:44:33 stas Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.78 2008/12/02 16:27:14 cseiler 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -1632,6 +1632,7 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_round, 0, 0, 1)
ZEND_ARG_INFO(0, number)
ZEND_ARG_INFO(0, precision)
+   ZEND_ARG_INFO(0, mode)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO(arginfo_sin, 0)
@@ -3571,6 +3572,11 @@
REGISTER_DOUBLE_CONSTANT(INF, php_get_inf(), CONST_CS | 
CONST_PERSISTENT);
REGISTER_DOUBLE_CONSTANT(NAN, php_get_nan(), CONST_CS | 
CONST_PERSISTENT);
 
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_UP, PHP_ROUND_HALF_UP, CONST_CS 
| CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_DOWN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_EVEN, 
CONST_CS | CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(PHP_ROUND_HALF_ODD, PHP_ROUND_HALF_ODD, 
CONST_CS | CONST_PERSISTENT);
+
 #if ENABLE_TEST_CLASS
test_class_startup();
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.m4?r1=1.80.2.3.2.3.2.6r2=1.80.2.3.2.3.2.7diff_format=u
Index: php-src/ext/standard/config.m4
diff -u php-src/ext/standard/config.m4:1.80.2.3.2.3.2.6 
php-src/ext/standard/config.m4:1.80.2.3.2.3.2.7
--- php-src/ext/standard/config.m4:1.80.2.3.2.3.2.6 Mon Aug 25 13:42:54 2008
+++ php-src/ext/standard/config.m4  Tue Dec  2 16:27:15 2008
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.80.2.3.2.3.2.6 2008/08/25 13:42:54 jani Exp $ -*- 
autoconf -*-
+dnl $Id: config.m4,v 1.80.2.3.2.3.2.7 2008/12/02 16:27:15 cseiler Exp $ -*- 
autoconf -*-
 
 divert(3)dnl
 
@@ -223,31 +223,6 @@
 divert(5)dnl
 
 dnl
-dnl round fuzz
-dnl
-AC_MSG_CHECKING([whether rounding works as expected])
-AC_TRY_RUN([
-#include math.h
-  /* keep this out-of-line to prevent use of gcc inline floor() */
-  double somefn(double n) {
-return floor(n*pow(10,2) + 0.5);
-  }
-  int main() {
-return somefn(0.045)/10.0 != 0.5;
-  }
-],[
-  PHP_ROUND_FUZZ=0.5
-  AC_MSG_RESULT(yes)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(no)
-],[
-  PHP_ROUND_FUZZ=0.501
-  AC_MSG_RESULT(cross compile)
-])
-AC_DEFINE_UNQUOTED(PHP_ROUND_FUZZ, $PHP_ROUND_FUZZ, [ see #24142 ])
-
-dnl
 dnl Check if there is a support means of creating a new process
 dnl and defining which handles it receives
 dnl
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/math.c?r1=1.131.2.2.2.6.2.10r2=1.131.2.2.2.6.2.11diff_format=u
Index: php-src/ext/standard/math.c
diff -u php-src/ext/standard/math.c:1.131.2.2.2.6.2.10 
php-src/ext/standard/math.c:1.131.2.2.2.6.2.11
--- php-src/ext/standard/math.c:1.131.2.2.2.6.2.10  Wed Oct 29 20:03:34 2008
+++ php-src/ext/standard/math.c Tue Dec  2 16:27:15 2008
@@ -19,70 +19,186 @@
+--+
 */
 
-/* $Id: math.c,v 1.131.2.2.2.6.2.10 2008/10/29 20:03:34 iliaa Exp $ */
+/* $Id: math.c,v 1.131.2.2.2.6.2.11 2008/12/02 16:27:15 cseiler Exp $ */
 
 #include php.h
 #include php_math.h
 #include zend_multiply.h
+#include zend_float.h
 
 #include math.h
 #include float.h
 #include stdlib.h
 
+/* {{{ php_intlog10abs
+   Returns floor(log10(fabs(val))), uses fast binary search */
+static inline int php_intlog10abs(double value) {
+   int result;
+   value = fabs(value);
 
+   if (value  1e-8 || value  1e23) {
+   result = (int)floor(log10(value));
+   } else {
+   static const double values[] = {
+   1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1,
+   1e0,  1e1,  1e2,  1e3,  1e4,  1e5,  1e6,  1e7,
+   1e8,  1e9,  1e10, 1e11, 1e12, 1e13, 1e14, 1e15,
+   1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22};
+   /* Do a binary search with 5 steps */
+   result = 16;
+   if (value  

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

2008-11-28 Thread Stanislav Malyshev
stasSat Nov 29 00:44:33 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFB: init BG(page_uid) and BG(page_gid)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.76r2=1.725.2.31.2.64.2.77diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.76 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.77
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.76 Wed Nov 26 
04:08:19 2008
+++ php-src/ext/standard/basic_functions.c  Sat Nov 29 00:44:33 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.76 2008/11/26 04:08:19 lbarnaud 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.77 2008/11/29 00:44:33 stas Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -3458,6 +3458,8 @@
 #endif
 
BG(incomplete_class) = incomplete_class_entry;
+   BG(page_uid) = -1;
+   BG(page_gid) = -1;
 }
 /* }}} */
 
@@ -3766,6 +3768,8 @@
 
PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 
+   BG(page_uid) = -1;
+   BG(page_gid) = -1;
return SUCCESS;
 }
 /* }}} */



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



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

2008-11-25 Thread Arnaud Le Blanc
lbarnaudWed Nov 26 04:08:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Missed file from commit for #44181  #44182
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.75r2=1.725.2.31.2.64.2.76diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.75 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.76
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.75 Mon Nov 24 
19:17:34 2008
+++ php-src/ext/standard/basic_functions.c  Wed Nov 26 04:08:19 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.75 2008/11/24 19:17:34 lbarnaud 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.76 2008/11/26 04:08:19 lbarnaud 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -330,7 +330,7 @@
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_extract, 0, 0, 1)
-   ZEND_ARG_INFO(0, arg) /* ARRAY_INFO(0, arg, 0) */
+   ZEND_ARG_INFO(ZEND_SEND_PREFER_REF, arg) /* ARRAY_INFO(0, arg, 0) */
ZEND_ARG_INFO(0, extract_type)
ZEND_ARG_INFO(0, prefix)
 ZEND_END_ARG_INFO()



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



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

2008-11-24 Thread Arnaud Le Blanc
lbarnaudMon Nov 24 19:17:35 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.74r2=1.725.2.31.2.64.2.75diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.74 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.75
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.74 Mon Nov 24 
18:12:17 2008
+++ php-src/ext/standard/basic_functions.c  Mon Nov 24 19:17:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.74 2008/11/24 18:12:17 stas Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.75 2008/11/24 19:17:34 lbarnaud 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3677,6 +3677,7 @@
memset(BG(strtok_table), 0, 256);
BG(strtok_string) = NULL;
BG(strtok_zval) = NULL;
+   BG(strtok_last) = NULL;
BG(locale_string) = NULL;
BG(array_walk_fci) = empty_fcall_info;
BG(array_walk_fci_cache) = empty_fcall_info_cache;



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



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

2008-11-13 Thread Stanislav Malyshev
stasThu Nov 13 18:48:25 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  [DOC] Add option for error_log to send directly to SAPI logger
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.71r2=1.725.2.31.2.64.2.72diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.71 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.72
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.71 Thu Nov 13 
10:14:03 2008
+++ php-src/ext/standard/basic_functions.c  Thu Nov 13 18:48:25 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.71 2008/11/13 10:14:03 lbarnaud 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.72 2008/11/13 18:48:25 stas Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -5084,6 +5084,7 @@
1 = send via email to 3rd parameter 4th option = additional headers
2 = send via tcp/ip to 3rd parameter (name or ip:port)
3 = save to file in 3rd parameter
+   4 = send to SAPI logger directly
 */
 
 /* {{{ proto bool error_log(string message [, int message_type [, string 
destination [, string extra_headers]]])
@@ -5137,7 +5138,13 @@
php_stream_write(stream, message, strlen(message));
php_stream_close(stream);
break;
-
+   case 4: /* send to SAPI */
+   if (sapi_module.log_message) {
+   sapi_module.log_message(message);
+   } else {
+   return FAILURE;
+   }
+   break;
default:
php_log_err(message TSRMLS_CC);
break;



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c file.c php_string.h string.c /ext/standard/tests/strings str_getcsv_001.phpt

2008-11-02 Thread Felipe Pena
felipe  Sun Nov  2 18:24:35 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings str_getcsv_001.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c file.c php_string.h 
string.c 
  Log:
  - MFH: Added str_getcsv()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.66r2=1.725.2.31.2.64.2.67diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.66 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.67
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.66 Fri Oct 24 
14:35:38 2008
+++ php-src/ext/standard/basic_functions.c  Sun Nov  2 18:24:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.66 2008/10/24 14:35:38 felipe 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.67 2008/11/02 18:24:34 felipe 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2344,6 +2344,13 @@
ZEND_ARG_INFO(1, result)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_str_getcsv, 0, 0, 1)
+   ZEND_ARG_INFO(0, string)
+   ZEND_ARG_INFO(0, delimiter)
+   ZEND_ARG_INFO(0, enclosure)
+   ZEND_ARG_INFO(0, escape)
+ZEND_END_ARG_INFO()
+
 ZEND_BEGIN_ARG_INFO(arginfo_str_repeat, 0)
ZEND_ARG_INFO(0, input)
ZEND_ARG_INFO(0, mult)
@@ -2745,6 +2752,7 @@
PHP_FE(chr, 
arginfo_chr)
PHP_FE(ord, 
arginfo_ord)
PHP_FE(parse_str,   
arginfo_parse_str)
+   PHP_FE(str_getcsv,  
arginfo_str_getcsv)
PHP_FE(str_pad, 
arginfo_str_pad)
PHP_FALIAS(chop,rtrim,  
arginfo_rtrim)
PHP_FALIAS(strchr,  strstr, 
arginfo_strstr)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.23r2=1.409.2.6.2.28.2.24diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.23 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.24
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.23 Tue Oct 21 22:08:37 2008
+++ php-src/ext/standard/file.c Sun Nov  2 18:24:34 2008
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.23 2008/10/21 22:08:37 lbarnaud Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.24 2008/11/02 18:24:34 felipe Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -2180,7 +2180,9 @@
memcpy(tptr, 
line_end, line_end_len);
tptr += 
line_end_len;
 
-   if ((new_buf = 
php_stream_get_line(stream, NULL, 0, new_len)) == NULL) {
+   if (stream == 
NULL) {
+   goto 
quit_loop_2;
+   } else if 
((new_buf = php_stream_get_line(stream, NULL, 0, new_len)) == NULL) {
/* 
we've got an unterminated enclosure,
 * 
assign all the data from the start of
 * the 
enclosure to end of data to the
@@ -2341,7 +2343,9 @@
 
 out:
efree(temp);
-   efree(buf);
+   if (stream) {
+   efree(buf);
+   }
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_string.h?r1=1.87.2.2.2.3.2.2r2=1.87.2.2.2.3.2.3diff_format=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.2 
php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.3
--- php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.2  Sat Jan 19 19:27:21 2008
+++ php-src/ext/standard/php_string.h   Sun Nov  2 18:24:34 2008
@@ -17,7 +17,7 @@

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c syslog.c

2008-10-16 Thread Kalle Sommer Nielsen
kalle   Thu Oct 16 23:19:14 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c syslog.c 
  Log:
  Use PHP_DEP_FE instead of throwing an E_DEPRECATED manually inside 
define_syslog_variables() (Thanks Hannes!)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.63r2=1.725.2.31.2.64.2.64diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.63 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.64
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.63 Sun Aug 31 
00:19:50 2008
+++ php-src/ext/standard/basic_functions.c  Thu Oct 16 23:19:13 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.63 2008/08/31 00:19:50 jani Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.64 2008/10/16 23:19:13 kalle Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -3668,7 +3668,7 @@
PHP_FE(openlog, 
arginfo_openlog)
PHP_FE(syslog,  
arginfo_syslog)
PHP_FE(closelog,
arginfo_closelog)
-   PHP_FE(define_syslog_variables, 
arginfo_define_syslog_variables)
+   PHP_DEP_FE(define_syslog_variables, 
arginfo_define_syslog_variables)
 #endif
 
/* functions from lcg.c */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/syslog.c?r1=1.49.2.3.2.2.2.4r2=1.49.2.3.2.2.2.5diff_format=u
Index: php-src/ext/standard/syslog.c
diff -u php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.4 
php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.5
--- php-src/ext/standard/syslog.c:1.49.2.3.2.2.2.4  Wed Oct 15 18:41:57 2008
+++ php-src/ext/standard/syslog.c   Thu Oct 16 23:19:13 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: syslog.c,v 1.49.2.3.2.2.2.4 2008/10/15 18:41:57 kalle Exp $ */
+/* $Id: syslog.c,v 1.49.2.3.2.2.2.5 2008/10/16 23:19:13 kalle Exp $ */
 
 #include php.h
 
@@ -207,8 +207,6 @@
return;
}
 
-   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, define_syslog_variables 
is deprecated, please use the syslog constants instead);
-
if (!BG(syslog_started)) {
start_syslog(TSRMLS_C);
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/file parse_ini_file_error.phpt /ext/standard/tests/general_functions parse_ini_file-win32.phpt parse_ini_file.phpt

2008-08-30 Thread Jani Taskinen
janiSun Aug 31 00:19:50 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/fileparse_ini_file_error.phpt 
/php-src/ext/standard/tests/general_functions   

parse_ini_file-win32.phpt 
parse_ini_file.phpt 
  Log:
  MFH:- Fixed bug #45956 (parse_ini_file() does not return false with syntax 
errors in parsed file)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.62r2=1.725.2.31.2.64.2.63diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.62 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.63
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.62 Sat Aug 23 
19:22:08 2008
+++ php-src/ext/standard/basic_functions.c  Sun Aug 31 00:19:50 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.62 2008/08/23 19:22:08 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.63 2008/08/31 00:19:50 jani Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -6359,7 +6359,11 @@
fh.type = ZEND_HANDLE_FILENAME;
 
array_init(return_value);
-   zend_parse_ini_file(fh, 0, scanner_mode, ini_parser_cb, return_value 
TSRMLS_CC);
+   if (zend_parse_ini_file(fh, 0, scanner_mode, ini_parser_cb, 
return_value TSRMLS_CC) == FAILURE) {
+   zend_hash_destroy(Z_ARRVAL_P(return_value));
+   efree(Z_ARRVAL_P(return_value));
+   RETURN_FALSE;
+   }
 }
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/parse_ini_file_error.phpt?r1=1.1.4.2r2=1.1.4.3diff_format=u
Index: php-src/ext/standard/tests/file/parse_ini_file_error.phpt
diff -u php-src/ext/standard/tests/file/parse_ini_file_error.phpt:1.1.4.2 
php-src/ext/standard/tests/file/parse_ini_file_error.phpt:1.1.4.3
--- php-src/ext/standard/tests/file/parse_ini_file_error.phpt:1.1.4.2   Wed Mar 
19 17:25:47 2008
+++ php-src/ext/standard/tests/file/parse_ini_file_error.phpt   Sun Aug 31 
00:19:50 2008
@@ -42,12 +42,10 @@
 -- Testing parse_ini_file() function with more than expected no. of arguments 
--
 
 Warning: parse_ini_file(%s): failed to open stream: No such file or directory 
in %s on line %d
-array(0) {
-}
+bool(false)
 
 -- Testing parse_ini_file() function with a non-existent file --
 
 Warning: parse_ini_file(%s): failed to open stream: No such file or directory 
in %s on line %d
-array(0) {
-}
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt
diff -u 
php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt:1.1.2.2  
Thu Aug 21 13:05:10 2008
+++ php-src/ext/standard/tests/general_functions/parse_ini_file-win32.phpt  
Sun Aug 31 00:19:50 2008
@@ -116,12 +116,10 @@
 bool(false)
 
 Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such 
file or directory in %s.php on line 8
-array(0) {
-}
+bool(false)
 
 Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such 
file or directory in %s.php on line 9
-array(0) {
-}
+bool(false)
 array(1) {
   [test]=
   string(0) 
@@ -129,17 +127,11 @@
 
 Warning: parse error in %s on line %d
  in %s on line 20
-array(1) {
-  [test]=
-  string(0) 
-}
+bool(false)
 
 Warning: parse error in %s on line %d
  in %s on line 26
-array(1) {
-  [test]=
-  string(4) test
-}
+bool(false)
 array(1) {
   [test]=
   string(8) new
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/parse_ini_file.phpt?r1=1.1.2.2.2.4r2=1.1.2.2.2.5diff_format=u
Index: php-src/ext/standard/tests/general_functions/parse_ini_file.phpt
diff -u 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.4 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.5
--- 
php-src/ext/standard/tests/general_functions/parse_ini_file.phpt:1.1.2.2.2.4
Thu Aug 21 13:05:10 2008
+++ php-src/ext/standard/tests/general_functions/parse_ini_file.phptSun Aug 
31 00:19:50 2008
@@ -116,12 +116,10 @@
 bool(false)
 
 Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such 
file or directory in %sparse_ini_file.php on line 8
-array(0) {
-}
+bool(false)
 
 Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such 
file or directory in %sparse_ini_file.php on line 9
-array(0) {
-}
+bool(false)
 array(1) {
   [test]=
   string(0) 
@@ -129,17 

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

2008-08-21 Thread Antony Dovgal
tony2001Thu Aug 21 07:38:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  fix build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.58r2=1.725.2.31.2.64.2.59diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.58 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.59
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.58 Wed Aug 20 
22:23:16 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 21 07:38:16 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.58 2008/08/20 22:23:16 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.59 2008/08/21 07:38:16 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4551,8 +4551,6 @@
 #endif
RETURN_TRUE;
} else {
-   int error = GetLastError();
-   printf(error: %i\n, error);
efree(pe.putenv_string);
efree(pe.key);
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_5_3) /ext/standard basic_functions.c

2008-08-21 Thread Antony Dovgal
tony2001Thu Aug 21 08:37:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  revert for now
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.59r2=1.725.2.31.2.64.2.60diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.59 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.60
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.59 Thu Aug 21 
07:38:16 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 21 08:37:19 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.59 2008/08/21 07:38:16 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.60 2008/08/21 08:37:19 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4966,7 +4966,7 @@
  */
 static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list 
args, zend_hash_key *hash_key)
 {
-   zval *retval = (zval *)(long)va_arg(args, int);
+   zval *retval = (zval *)va_arg(args, int);
zval *tmp;
 
if (Z_TYPE_P(entry) == IS_STRING) {



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



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

2008-08-21 Thread Marcus Boerger
helly   Thu Aug 21 16:55:45 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - MFH Fix 64bit issue
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.60r2=1.725.2.31.2.64.2.61diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.60 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.61
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.60 Thu Aug 21 
08:37:19 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 21 16:55:45 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.60 2008/08/21 08:37:19 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.61 2008/08/21 16:55:45 helly Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -4966,7 +4966,7 @@
  */
 static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list 
args, zend_hash_key *hash_key)
 {
-   zval *retval = (zval *)va_arg(args, int);
+   zval *retval = (zval *)va_arg(args, zval*);
zval *tmp;
 
if (Z_TYPE_P(entry) == IS_STRING) {



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



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

2008-08-20 Thread Antony Dovgal
tony2001Wed Aug 20 09:01:25 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  fix warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.56r2=1.725.2.31.2.64.2.57diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.57
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56 Tue Aug 19 
15:14:46 2008
+++ php-src/ext/standard/basic_functions.c  Wed Aug 20 09:01:24 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.56 2008/08/19 15:14:46 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.57 2008/08/20 09:01:24 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4958,7 +4958,7 @@
  */
 static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args, va_list 
args, zend_hash_key *hash_key)
 {
-   zval *retval = (zval *) va_arg(args, int);
+   zval *retval = (zval *)(long)va_arg(args, int);
zval *tmp;
 
if (Z_TYPE_P(entry) == IS_STRING) {



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-08-20 Thread Marcus Boerger
Hello Antony,

Wednesday, August 20, 2008, 11:01:25 AM, you wrote:

 tony2001Wed Aug 20 09:01:25 2008 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/standard   basic_functions.c 
   Log:
   fix warning
   
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.56r2=1.725.2.31.2.64.2.57diff_format=u
 Index: php-src/ext/standard/basic_functions.c
 diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56
 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.57
 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56   Tue Aug 
 19 15:14:46 2008
 +++ php-src/ext/standard/basic_functions.c  Wed Aug 20 09:01:24 2008
 @@ -18,7 +18,7 @@

 +--+
   */
  
 -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.56 2008/08/19 15:14:46 
 tony2001 Exp $ */
 +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.57 2008/08/20 09:01:24 
 tony2001 Exp $ */
  
  #include php.h
  #include php_streams.h
 @@ -4958,7 +4958,7 @@
   */
  static int add_config_entry_cb(zval *entry TSRMLS_DC, int num_args,
 va_list args, zend_hash_key *hash_key)
  {
 -   zval *retval = (zval *) va_arg(args, int);
 +   zval *retval = (zval *)(long)va_arg(args, int);

This cannot be correct as there are systems where sizeof(int) 
sizeof(void*).

 zval *tmp;
  
 if (Z_TYPE_P(entry) == IS_STRING) {






Best regards,
 Marcus


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



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

2008-08-20 Thread Pierre-Alain Joye
pajoye  Wed Aug 20 22:23:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - MFH: work around vc6 bug
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.57r2=1.725.2.31.2.64.2.58diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.57 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.58
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.57 Wed Aug 20 
09:01:24 2008
+++ php-src/ext/standard/basic_functions.c  Wed Aug 20 22:23:16 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.57 2008/08/20 09:01:24 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.58 2008/08/20 22:23:16 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4451,6 +4451,7 @@
 #ifdef PHP_WIN32
char *value = NULL;
int equals = 0;
+   int error_code;
 #endif
 
pe.putenv_string = estrndup(setting, setting_len);
@@ -4532,7 +4533,14 @@
 # ifndef PHP_WIN32
if (putenv(pe.putenv_string) == 0) { /* success */
 # else
-   if (SetEnvironmentVariableA(pe.key, value) != 0) { /* success */
+   error_code = SetEnvironmentVariable(pe.key, value);
+#  if _MSC_VER  1500
+   /* Yet another VC6 bug, unset may return env not found */
+   if (error_code != 0 || 
+   (error_code == 0  GetLastError() == 
ERROR_ENVVAR_NOT_FOUND)) {
+#  else
+   if (error_code != 0) { /* success */
+#  endif
 # endif
 #endif
zend_hash_add(BG(putenv_ht), pe.key, pe.key_len + 1, 
(void **) pe, sizeof(putenv_entry), NULL);
@@ -4543,6 +4551,8 @@
 #endif
RETURN_TRUE;
} else {
+   int error = GetLastError();
+   printf(error: %i\n, error);
efree(pe.putenv_string);
efree(pe.key);
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_5_3) /ext/standard basic_functions.c crypt.c php_crypt.h

2008-08-19 Thread Antony Dovgal
tony2001Tue Aug 19 15:14:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c crypt.c php_crypt.h 
  Log:
  MFH: shutdown crypt correctly and fix memleak in ZTS mode
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.55r2=1.725.2.31.2.64.2.56diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.55 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.56
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.55 Mon Aug 18 
10:49:59 2008
+++ php-src/ext/standard/basic_functions.c  Tue Aug 19 15:14:46 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.55 2008/08/18 10:49:59 jani Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.56 2008/08/19 15:14:46 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4108,7 +4108,6 @@
basic_globals_dtor(basic_globals TSRMLS_CC);
 #ifdef PHP_WIN32
php_win32_core_globals_dtor(the_php_win32_core_globals TSRMLS_CC);
-   PHP_MSHUTDOWN(crypt);
 #endif
 #endif
 
@@ -4129,6 +4128,7 @@
 #if defined(HAVE_LOCALECONV)  defined(ZTS)
PHP_MSHUTDOWN(localeconv)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 #endif
+   PHP_MSHUTDOWN(crypt)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 
return SUCCESS;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt.c?r1=1.62.2.1.2.6.2.3r2=1.62.2.1.2.6.2.4diff_format=u
Index: php-src/ext/standard/crypt.c
diff -u php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.3 
php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.4
--- php-src/ext/standard/crypt.c:1.62.2.1.2.6.2.3   Mon Jul 28 11:50:34 2008
+++ php-src/ext/standard/crypt.cTue Aug 19 15:14:46 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: crypt.c,v 1.62.2.1.2.6.2.3 2008/07/28 11:50:34 pajoye Exp $ */
+/* $Id: crypt.c,v 1.62.2.1.2.6.2.4 2008/08/19 15:14:46 tony2001 Exp $ */
 
 #include stdlib.h
 
@@ -107,15 +107,16 @@
 
return SUCCESS;
 }
+/* }}} */
 
-#ifdef PHP_USE_PHP_CRYPT_R
-PHP_MSHUTDOWN_FUNCTION(crypt)
+PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */
 {
+#ifdef PHP_USE_PHP_CRYPT_R
php_shutdown_crypt_r();
+#endif
 
return SUCCESS;
 }
-#endif
 /* }}} */
 
 static unsigned char itoa64[] = 
./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_crypt.h?r1=1.18.2.1.2.1.2.2r2=1.18.2.1.2.1.2.3diff_format=u
Index: php-src/ext/standard/php_crypt.h
diff -u php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.2 
php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.3
--- php-src/ext/standard/php_crypt.h:1.18.2.1.2.1.2.2   Mon Jul 28 11:50:34 2008
+++ php-src/ext/standard/php_crypt.hTue Aug 19 15:14:46 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_crypt.h,v 1.18.2.1.2.1.2.2 2008/07/28 11:50:34 pajoye Exp $ */
+/* $Id: php_crypt.h,v 1.18.2.1.2.1.2.3 2008/08/19 15:14:46 tony2001 Exp $ */
 
 #ifndef PHP_CRYPT_H
 #define PHP_CRYPT_H
@@ -26,9 +26,7 @@
 PHP_FUNCTION(crypt);
 #if HAVE_CRYPT
 PHP_MINIT_FUNCTION(crypt);
-#if PHP_WIN32
 PHP_MSHUTDOWN_FUNCTION(crypt);
-#endif
 PHP_RINIT_FUNCTION(crypt);
 #endif
 



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



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

2008-08-18 Thread Jani Taskinen
janiMon Aug 18 10:50:00 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: fix include
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.54r2=1.725.2.31.2.64.2.55diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.54 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.55
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.54 Mon Aug 18 
07:50:10 2008
+++ php-src/ext/standard/basic_functions.c  Mon Aug 18 10:49:59 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.54 2008/08/18 07:50:10 pajoye 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.55 2008/08/18 10:49:59 jani Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -63,7 +63,7 @@
 #include netinet/in.h
 #endif
 
-# includenetdb.h
+#include netdb.h
 
 #if HAVE_ARPA_INET_H
 # include arpa/inet.h



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-08-18 Thread Stanislav Malyshev

Hi!


   .  FOO=1234 = set FOO to 1234
   .  FOO= = set FOO to an empty string
   .  FOO= = unset FOO


Err, what's the difference between the last two?
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-08-18 Thread Pierre Joye
hi!

On Mon, Aug 18, 2008 at 9:14 PM, Stanislav Malyshev [EMAIL PROTECTED] wrote:
 Hi!

   .  FOO=1234 = set FOO to 1234
   .  FOO= = set FOO to an empty string
   .  FOO= = unset FOO

meant FOO


-- 
Pierre
http://blog.thepimp.net | http://www.libgd.org

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



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

2008-08-16 Thread Hannes Magnusson
bjori   Sat Aug 16 11:11:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Fix arginfo
  # Yes Jani, it is correct in HEAD :)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.51r2=1.725.2.31.2.64.2.52diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.51 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.52
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.51 Sat Aug 16 
10:57:56 2008
+++ php-src/ext/standard/basic_functions.c  Sat Aug 16 11:11:46 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.51 2008/08/16 10:57:56 bjori Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.52 2008/08/16 11:11:46 bjori Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -2403,6 +2403,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_stream_context_create, 0, 0, 0)
ZEND_ARG_INFO(0, options) /* ARRAY_INFO(0, options, 1) */
+   ZEND_ARG_INFO(0, params) /* ARRAY_INFO(0, params, 1) */
 ZEND_END_ARG_INFO()
 
 static



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



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

2008-08-14 Thread Kalle Sommer Nielsen
kalle   Thu Aug 14 09:27:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Fix arginfo for nl2br
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.47r2=1.725.2.31.2.64.2.48diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.47 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.48
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.47 Thu Aug 14 
02:56:22 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 14 09:27:33 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.47 2008/08/14 02:56:22 kalle Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.48 2008/08/14 09:27:33 kalle Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -2737,7 +2737,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, is_xhtml)
 ZEND_END_ARG_INFO()



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



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

2008-08-14 Thread Antony Dovgal
tony2001Thu Aug 14 09:41:17 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  fix build
  compile before commit?
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.48r2=1.725.2.31.2.64.2.49diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.48 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.49
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.48 Thu Aug 14 
09:27:33 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 14 09:41:16 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.48 2008/08/14 09:27:33 kalle Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.49 2008/08/14 09:41:16 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2737,7 +2737,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_nl2br, 0, 0, 1)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_nl2br, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, is_xhtml)
 ZEND_END_ARG_INFO()



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c quot_print.c quot_print.h /ext/standard/tests/strings quoted_printable_encode_001.phpt quoted_printable_encode_002.phpt

2008-08-14 Thread Antony Dovgal
tony2001Thu Aug 14 10:12:24 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings 
quoted_printable_encode_001.phpt 
quoted_printable_encode_002.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c quot_print.c quot_print.h 
  Log:
  MFH: add quoted_printable_encode()
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.49r2=1.725.2.31.2.64.2.50diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.49 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.50
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.49 Thu Aug 14 
09:41:16 2008
+++ php-src/ext/standard/basic_functions.c  Thu Aug 14 10:12:19 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.49 2008/08/14 09:41:16 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.50 2008/08/14 10:12:19 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2210,6 +2210,12 @@
ZEND_ARG_INFO(0, str)
 ZEND_END_ARG_INFO()
 /* }}} */
+/* {{{ quot_print.c */
+static
+ZEND_BEGIN_ARG_INFO(arginfo_quoted_printable_encode, 0)
+   ZEND_ARG_INFO(0, str)
+ZEND_END_ARG_INFO()
+/* }}} */
 /* {{{ rand.c */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_srand, 0, 0, 0)
@@ -3371,6 +3377,7 @@
 #endif
 
PHP_FE(quoted_printable_decode, 
arginfo_quoted_printable_decode)
+   PHP_FE(quoted_printable_encode, 
arginfo_quoted_printable_encode)
PHP_FE(convert_cyr_string,  
arginfo_convert_cyr_string)
PHP_FE(get_current_user,
arginfo_get_current_user)
PHP_FE(set_time_limit,  
arginfo_set_time_limit)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/quot_print.c?r1=1.29.2.2.2.1.2.3r2=1.29.2.2.2.1.2.4diff_format=u
Index: php-src/ext/standard/quot_print.c
diff -u php-src/ext/standard/quot_print.c:1.29.2.2.2.1.2.3 
php-src/ext/standard/quot_print.c:1.29.2.2.2.1.2.4
--- php-src/ext/standard/quot_print.c:1.29.2.2.2.1.2.3  Thu Aug 14 09:29:22 2008
+++ php-src/ext/standard/quot_print.c   Thu Aug 14 10:12:20 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: quot_print.c,v 1.29.2.2.2.1.2.3 2008/08/14 09:29:22 tony2001 Exp $ */
+/* $Id: quot_print.c,v 1.29.2.2.2.1.2.4 2008/08/14 10:12:20 tony2001 Exp $ */
 
 #include stdlib.h
 
@@ -143,6 +143,53 @@
 }
 /* }}} */
 
+#define PHP_QPRINT_MAXL 75
+ 
+PHPAPI unsigned char *php_quot_print_encode(const unsigned char *str, size_t 
length, size_t *ret_length) /* {{{ */
+{
+   unsigned long lp = 0;
+   unsigned char c, *ret, *d;
+   char *hex = 0123456789ABCDEF;
+
+   ret = safe_emalloc(1, 3 * length + 3 * (((3 * length)/PHP_QPRINT_MAXL) 
+ 1), 0);
+   d = ret;
+
+   while (length--) {
+   if (((c = *str++) == '\015')  (*str == '\012')  length  0) 
{
+   *d++ = '\015';
+   *d++ = *str++;
+   length--;
+   lp = 0;
+   } else {
+   if (iscntrl (c) || (c == 0x7f) || (c  0x80) || (c == 
'=') || ((c == ' ')  (*str == '\015'))) {
+   if ((lp += 3)  PHP_QPRINT_MAXL) {
+   *d++ = '=';
+   *d++ = '\015';
+   *d++ = '\012';
+   lp = 3;
+   }
+   *d++ = '=';
+   *d++ = hex[c  4];
+   *d++ = hex[c  0xf];
+   } else {
+   if ((++lp)  PHP_QPRINT_MAXL) {
+   *d++ = '=';
+   *d++ = '\015';
+   *d++ = '\012';
+   lp = 1;
+   }
+   *d++ = c;
+   }
+   }
+   }
+   *d = '\0';
+   *ret_length = d - ret;
+
+   ret = erealloc(ret, *ret_length + 1);
+   return ret;
+}
+/* }}} */
+
 /*
 *
 * Decoding  Quoted-printable string.
@@ -209,6 +256,26 @@
 }
 /* }}} */
 
+/* {{{ proto string 

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

2008-07-29 Thread Pierre-Alain Joye
pajoye  Tue Jul 29 17:28:42 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - MFH: missing in the previous crypt commit (shutdown frees the locking 
mechanism)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.41r2=1.725.2.31.2.64.2.42diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.41 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.42
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.41 Thu Jul 24 
19:52:24 2008
+++ php-src/ext/standard/basic_functions.c  Tue Jul 29 17:28:41 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.41 2008/07/24 19:52:24 felipe 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.42 2008/07/29 17:28:41 pajoye 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -4078,6 +4078,7 @@
basic_globals_dtor(basic_globals TSRMLS_CC);
 #ifdef PHP_WIN32
php_win32_core_globals_dtor(the_php_win32_core_globals TSRMLS_CC);
+   PHP_MSHUTDOWN(crypt);
 #endif
 #endif
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt jump

2008-07-17 Thread Felipe Pena
felipe  Thu Jul 17 19:29:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_compile.c 
/ZendEngine2/tests  bug43027.phpt jump12.phpt 
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/general_functions   bug41037.phpt 
closures_002.phpt 
  Log:
  - Deprecate ticks
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.72r2=1.647.2.27.2.41.2.73diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 
ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.73
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 Mon Jul 14 12:18:20 2008
+++ ZendEngine2/zend_compile.c  Thu Jul 17 19:29:34 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.72 2008/07/14 12:18:20 dmitry Exp $ 
*/
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.73 2008/07/17 19:29:34 felipe Exp $ 
*/
 
 #include zend_language_parser.h
 #include zend.h
@@ -4592,6 +4592,8 @@
if (!zend_binary_strcasecmp(var-u.constant.value.str.val, 
var-u.constant.value.str.len, ticks, sizeof(ticks)-1)) {
convert_to_long(val-u.constant);
CG(declarables).ticks = val-u.constant;
+   
+   zend_error(E_DEPRECATED, Ticks is deprecated and will be 
removed in PHP 6);
 #ifdef ZEND_MULTIBYTE
} else if (!zend_binary_strcasecmp(var-u.constant.value.str.val, 
var-u.constant.value.str.len, encoding, sizeof(encoding)-1)) {
zend_encoding *new_encoding, *old_encoding;
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug43027.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: ZendEngine2/tests/bug43027.phpt
diff -u ZendEngine2/tests/bug43027.phpt:1.1.2.1 
ZendEngine2/tests/bug43027.phpt:1.1.2.2
--- ZendEngine2/tests/bug43027.phpt:1.1.2.1 Thu Nov  1 11:58:58 2007
+++ ZendEngine2/tests/bug43027.phpt Thu Jul 17 19:29:34 2008
@@ -6,5 +6,6 @@
 namespace test;
 echo ok\n;
 ?
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/jump12.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: ZendEngine2/tests/jump12.phpt
diff -u ZendEngine2/tests/jump12.phpt:1.1.2.2 
ZendEngine2/tests/jump12.phpt:1.1.2.3
--- ZendEngine2/tests/jump12.phpt:1.1.2.2   Fri Mar 28 14:35:01 2008
+++ ZendEngine2/tests/jump12.phpt   Thu Jul 17 19:29:34 2008
@@ -13,7 +13,8 @@
 print ok!\n;
 goto b;
 ?
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok!
 ok!
 ok!
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.36r2=1.725.2.31.2.64.2.37diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.37
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 Thu Jul 17 
09:53:42 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 19:29:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.36 2008/07/17 09:53:42 dmitry 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.37 2008/07/17 19:29:34 felipe 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6031,6 +6031,8 @@
if (tick_fe.arg_count  1) {
WRONG_PARAM_COUNT;
}
+   
+   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, Ticks is deprecated and 
will be removed in PHP 6);
 
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), 
tick_fe.arg_count, 0);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41037.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41037.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2  Tue Apr 
10 09:37:09 2007
+++ php-src/ext/standard/tests/general_functions/bug41037.phpt  Thu Jul 17 
19:29:34 2008
@@ -14,6 +14,9 @@
 echo Done\n;
 ?
 --EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
+
+Deprecated: register_tick_function(): Ticks is deprecated and will be removed 
in PHP 6 in %s on line %d
 hello
 Warning: unregister_tick_function(): Unable to delete tick function executed 
at the moment in %s on line %d
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/closures_002.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/closures_002.phpt
diff -u 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt

2008-07-17 Thread Jani Taskinen

Isn't ticks plural? ;) ticks is - ticks are

--Jani

Felipe Pena kirjoitti:

felipe  Thu Jul 17 19:29:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2	zend_compile.c 
/ZendEngine2/tests	bug43027.phpt jump12.phpt 
/php-src/ext/standard	basic_functions.c 
/php-src/ext/standard/tests/general_functions	bug41037.phpt 
 	closures_002.phpt 
  Log:

  - Deprecate ticks
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.72r2=1.647.2.27.2.41.2.73diff_format=u

Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 
ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.73
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 Mon Jul 14 12:18:20 2008
+++ ZendEngine2/zend_compile.c  Thu Jul 17 19:29:34 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.72 2008/07/14 12:18:20 dmitry Exp $ */

+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.73 2008/07/17 19:29:34 felipe Exp $ 
*/
 
 #include zend_language_parser.h

 #include zend.h
@@ -4592,6 +4592,8 @@
if (!zend_binary_strcasecmp(var-u.constant.value.str.val, var-u.constant.value.str.len, 
ticks, sizeof(ticks)-1)) {
convert_to_long(val-u.constant);
CG(declarables).ticks = val-u.constant;
+   
+   zend_error(E_DEPRECATED, Ticks is deprecated and will be removed in 
PHP 6);
 #ifdef ZEND_MULTIBYTE
} else if (!zend_binary_strcasecmp(var-u.constant.value.str.val, 
var-u.constant.value.str.len, encoding, sizeof(encoding)-1)) {
zend_encoding *new_encoding, *old_encoding;
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug43027.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: ZendEngine2/tests/bug43027.phpt
diff -u ZendEngine2/tests/bug43027.phpt:1.1.2.1 
ZendEngine2/tests/bug43027.phpt:1.1.2.2
--- ZendEngine2/tests/bug43027.phpt:1.1.2.1 Thu Nov  1 11:58:58 2007
+++ ZendEngine2/tests/bug43027.phpt Thu Jul 17 19:29:34 2008
@@ -6,5 +6,6 @@
 namespace test;
 echo ok\n;
 ?
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/jump12.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: ZendEngine2/tests/jump12.phpt
diff -u ZendEngine2/tests/jump12.phpt:1.1.2.2 
ZendEngine2/tests/jump12.phpt:1.1.2.3
--- ZendEngine2/tests/jump12.phpt:1.1.2.2   Fri Mar 28 14:35:01 2008
+++ ZendEngine2/tests/jump12.phpt   Thu Jul 17 19:29:34 2008
@@ -13,7 +13,8 @@
 print ok!\n;
 goto b;
 ?
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok!
 ok!
 ok!
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.36r2=1.725.2.31.2.64.2.37diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.37
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 Thu Jul 17 
09:53:42 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 19:29:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.36 2008/07/17 09:53:42 dmitry Exp $ */

+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.37 2008/07/17 19:29:34 felipe 
Exp $ */
 
 #include php.h

 #include php_streams.h
@@ -6031,6 +6031,8 @@
if (tick_fe.arg_count  1) {
WRONG_PARAM_COUNT;
}
+   
+   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, Ticks is deprecated and will 
be removed in PHP 6);
 
 	tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41037.phpt?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u

Index: php-src/ext/standard/tests/general_functions/bug41037.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2  Tue Apr 
10 09:37:09 2007
+++ php-src/ext/standard/tests/general_functions/bug41037.phpt  Thu Jul 17 
19:29:34 2008
@@ -14,6 +14,9 @@
 echo Done\n;
 ?
 --EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
+
+Deprecated: register_tick_function(): Ticks is deprecated and will be removed 
in PHP 6 in %s on line %d
 hello
 Warning: unregister_tick_function(): Unable to delete tick function executed 
at the moment in %s on line %d
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/closures_002.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/closures_002.phpt
diff -u 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt j

2008-07-17 Thread Felipe Pena
Em Sex, 2008-07-18 às 01:15 +0300, Jani Taskinen escreveu:
 Isn't ticks plural? ;) ticks is - ticks are
 

The word 'ticks' was used to mention the directive name. 
Anyway, is it still wrong?


-- 
Regards,
Felipe Pena.


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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/file magic_quotes.phpt

2008-05-25 Thread Hannes Magnusson
bjori   Sun May 25 14:06:15 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/filemagic_quotes.phpt 
  Log:
  Remove E_DEPRECATED from get_magic_quotes_*()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.34r2=1.725.2.31.2.64.2.35diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.34 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.35
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.34 Mon May 12 
08:47:01 2008
+++ php-src/ext/standard/basic_functions.c  Sun May 25 14:06:13 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.34 2008/05/12 08:47:01 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.35 2008/05/25 14:06:13 bjori Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -3347,8 +3347,8 @@
 
PHP_DEP_FALIAS(magic_quotes_runtime,set_magic_quotes_runtime,   
NULL)
PHP_DEP_FE(set_magic_quotes_runtime,
NULL)
-   PHP_DEP_FE(get_magic_quotes_gpc,
NULL)
-   PHP_DEP_FE(get_magic_quotes_runtime,
NULL)
+   PHP_FE(get_magic_quotes_gpc,
NULL)
+   PHP_FE(get_magic_quotes_runtime,
NULL)
 
PHP_FE(import_request_variables,
arginfo_import_request_variables)
PHP_FE(error_log,   
arginfo_error_log)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/magic_quotes.phpt?r1=1.1.2.1.2.3r2=1.1.2.1.2.4diff_format=u
Index: php-src/ext/standard/tests/file/magic_quotes.phpt
diff -u php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.3 
php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.4
--- php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.3   Thu May 
 8 22:21:19 2008
+++ php-src/ext/standard/tests/file/magic_quotes.phpt   Sun May 25 14:06:15 2008
@@ -43,36 +43,25 @@
 echo Done\n;
 ?
 --EXPECTF-- 
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
 
 Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
 bool(true)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(1)
 
 Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
 bool(true)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(1)
 string(30) some\'content\'here\and}there
 
 Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
 bool(true)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
 string(27) some'content'hereand}there
 
 Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
 bool(true)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(1)
 string(30) some\'content\'here\and}there
 
@@ -81,8 +70,6 @@
 
 Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
 bool(false)
-
-Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
 string(27) some'content'hereand}there
 Done



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



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

2008-05-12 Thread Antony Dovgal
tony2001Mon May 12 08:47:01 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: revert patch that causes invalid reads/crashes on Linux
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.33r2=1.725.2.31.2.64.2.34diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.33 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.34
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.33 Thu May  8 
22:21:18 2008
+++ php-src/ext/standard/basic_functions.c  Mon May 12 08:47:01 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.33 2008/05/08 22:21:18 felipe 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.34 2008/05/12 08:47:01 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3820,7 +3820,9 @@
SetEnvironmentVariable(pe-key, bugbug);
 #endif
putenv(pe-previous_value);
+# if defined(PHP_WIN32)
efree(pe-previous_value);
+# endif
} else {
 # if HAVE_UNSETENV
unsetenv(pe-key);
@@ -4425,8 +4427,12 @@
pe.previous_value = NULL;
for (env = environ; env != NULL  *env != NULL; env++) {
if (!strncmp(*env, pe.key, pe.key_len)  
(*env)[pe.key_len] == '=') {  /* found it */
-   /* must copy previous value because putenv can 
free the string without notice */
+#if defined(PHP_WIN32)
+   /* must copy previous value because MSVCRT's 
putenv can free the string without notice */
pe.previous_value = estrdup(*env);
+#else
+   pe.previous_value = *env;
+#endif
break;
}
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/file magic_quotes.phpt

2008-05-08 Thread Felipe Pena
felipe  Thu May  8 22:21:19 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/filemagic_quotes.phpt 
  Log:
  - Use PHP_DEP_FE and PHP_DEP_FALIAS (magic_quotes related functions)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.32r2=1.725.2.31.2.64.2.33diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.32 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.33
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.32 Tue May  6 
18:01:32 2008
+++ php-src/ext/standard/basic_functions.c  Thu May  8 22:21:18 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.32 2008/05/06 18:01:32 iliaa Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.33 2008/05/08 22:21:18 felipe 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -3345,10 +3345,10 @@
PHP_FE(set_time_limit,  
arginfo_set_time_limit)
PHP_FE(get_cfg_var, 
arginfo_get_cfg_var)
 
-   PHP_FALIAS(magic_quotes_runtime,set_magic_quotes_runtime,   
NULL)
-   PHP_FE(set_magic_quotes_runtime,
NULL)
-   PHP_FE(get_magic_quotes_gpc,
NULL)
-   PHP_FE(get_magic_quotes_runtime,
NULL)
+   PHP_DEP_FALIAS(magic_quotes_runtime,set_magic_quotes_runtime,   
NULL)
+   PHP_DEP_FE(set_magic_quotes_runtime,
NULL)
+   PHP_DEP_FE(get_magic_quotes_gpc,
NULL)
+   PHP_DEP_FE(get_magic_quotes_runtime,
NULL)
 
PHP_FE(import_request_variables,
arginfo_import_request_variables)
PHP_FE(error_log,   
arginfo_error_log)
@@ -4927,8 +4927,6 @@
RETURN_FALSE;
}
 
-   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, This function is 
deprecated and removed in PHP 6. See 
http://php.net/{migrate}#set_magic_quotes_runtime for details.);
-
convert_to_boolean_ex(new_setting);
 
PG(magic_quotes_runtime) = (zend_bool) Z_LVAL_PP(new_setting);
@@ -4940,7 +4938,6 @@
Get the current active configuration setting of magic_quotes_runtime */
 PHP_FUNCTION(get_magic_quotes_runtime)
 {
-   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, This function is 
deprecated and removed in PHP 6. See 
http://php.net/{migrate}#get_magic_quotes_runtime for details.);
RETURN_LONG(PG(magic_quotes_runtime));
 }
 /* }}} */
@@ -4949,7 +4946,6 @@
Get the current active configuration setting of magic_quotes_gpc */
 PHP_FUNCTION(get_magic_quotes_gpc)
 {
-   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, This function is 
deprecated and removed in PHP 6. See 
http://php.net/{migrate}#get_magic_quotes_gpc for details.);
RETURN_LONG(PG(magic_quotes_gpc));
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/magic_quotes.phpt?r1=1.1.2.1.2.2r2=1.1.2.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/magic_quotes.phpt
diff -u php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.2 
php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.3
--- php-src/ext/standard/tests/file/magic_quotes.phpt:1.1.2.1.2.2   Sun Feb 
24 11:27:26 2008
+++ php-src/ext/standard/tests/file/magic_quotes.phpt   Thu May  8 22:21:19 2008
@@ -43,44 +43,46 @@
 echo Done\n;
 ?
 --EXPECTF-- 
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and 
removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. 
in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
 
-Deprecated: get_magic_quotes_runtime(): This function is deprecated and 
removed in PHP 6. See http://php.net/%s#get_magic_quotes_runtime for details. 
in %s on line %d
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 int(0)
 
-Deprecated: set_magic_quotes_runtime(): This function is deprecated and 
removed in PHP 6. See http://php.net/%s#set_magic_quotes_runtime for details. 
in %s on line %d

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-05-07 Thread Antony Dovgal

On 06.05.2008 22:01, Ilia Alshanetsky wrote:

iliaa   Tue May  6 18:01:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard	basic_functions.c 
  Log:

  Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in
  POSIX systems)
  
  # Original patch by delphij at FreeBSD dot org


The patch may be correct for FreeBSD, but this is what it causes on Linux:
# cat sapi/cgi/tests/001.mem
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c:3826)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c:3826)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in /lib64/libc-2.5.so)
==3077==by 0x85C34CD: putenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24173: putenv (mc_replace_strmem.c:743)
==3077==by 0x75088C: php_putenv_destructor (basic_functions.c:3822)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in /lib64/libc-2.5.so)
==3077==by 0x85C34CD: putenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24173: putenv (mc_replace_strmem.c:743)
==3077==by 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-05-07 Thread Felipe Pena
Hi,
Maybe we could use setenv() instead?

The setenv() function is preferred over this function.
http://www.opengroup.org/onlinepubs/009695399/functions/putenv.html

Em Qua, 2008-05-07 às 12:42 +0400, Antony Dovgal escreveu:
 On 06.05.2008 22:01, Ilia Alshanetsky wrote:
  iliaa   Tue May  6 18:01:36 2008 UTC
  
Modified files:  (Branch: PHP_5_3)
  /php-src/ext/standard   basic_functions.c 
Log:
Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in
POSIX systems)

# Original patch by delphij at FreeBSD dot org
 
 The patch may be correct for FreeBSD, but this is what it causes on Linux:
 # cat sapi/cgi/tests/001.mem
 ==3077== Invalid read of size 1
 ==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
 ==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
 ==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
 ==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c:3826)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main (php_cli.c:1320)
 ==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
 ==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
 ==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
 ==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main (php_cli.c:1320)
 ==3077==
 ==3077== Invalid read of size 1
 ==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
 ==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
 ==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
 ==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c:3826)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main (php_cli.c:1320)
 ==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
 ==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
 ==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
 ==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main (php_cli.c:1320)
 ==3077==
 ==3077== Invalid read of size 1
 ==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
 ==3077==by 0x85C3750: __add_to_environ (in /lib64/libc-2.5.so)
 ==3077==by 0x85C34CD: putenv (in /lib64/libc-2.5.so)
 ==3077==by 0x4C24173: putenv (mc_replace_strmem.c:743)
 ==3077==by 0x75088C: php_putenv_destructor (basic_functions.c:3822)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main (php_cli.c:1320)
 ==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18 free'd
 ==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
 ==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
 ==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c:3823)
 ==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
 ==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
 ==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
 ==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
 ==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
 ==3077==by 0x813040: php_request_shutdown (main.c:1497)
 ==3077==by 0x92C04A: main 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-05-07 Thread Ilia Alshanetsky

I'll take a look, I wonder why it would cause a problem on Linux...


On 7-May-08, at 4:42 AM, Antony Dovgal wrote:


On 06.05.2008 22:01, Ilia Alshanetsky wrote:

iliaa   Tue May  6 18:01:36 2008 UTC
 Modified files:  (Branch: PHP_5_3)
   /php-src/ext/standardbasic_functions.c   Log:
 Fixed bug #44836 (putenv() crashes, avoid direct reference of  
environ in

 POSIX systems)
   # Original patch by delphij at FreeBSD dot org


The patch may be correct for FreeBSD, but this is what it causes on  
Linux:

# cat sapi/cgi/tests/001.mem
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c: 
3826)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c: 
3826)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in /lib64/libc-2.5.so)
==3077==by 0x85C34CD: putenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24173: putenv (mc_replace_strmem.c:743)
==3077==by 0x75088C: php_putenv_destructor (basic_functions.c: 
3822)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-05-07 Thread Ilia Alshanetsky

What libc are you using? I can't seem to reproduce the issue here...


On 7-May-08, at 4:42 AM, Antony Dovgal wrote:


On 06.05.2008 22:01, Ilia Alshanetsky wrote:

iliaa   Tue May  6 18:01:36 2008 UTC
 Modified files:  (Branch: PHP_5_3)
   /php-src/ext/standardbasic_functions.c   Log:
 Fixed bug #44836 (putenv() crashes, avoid direct reference of  
environ in

 POSIX systems)
   # Original patch by delphij at FreeBSD dot org


The patch may be correct for FreeBSD, but this is what it causes on  
Linux:

# cat sapi/cgi/tests/001.mem
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c: 
3826)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C364D: unsetenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24203: unsetenv (mc_replace_strmem.c:760)
==3077==by 0x7508BD: php_putenv_destructor (basic_functions.c: 
3826)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DB9: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in /lib64/libc-2.5.so)
==3077==by 0x85C34CD: putenv (in /lib64/libc-2.5.so)
==3077==by 0x4C24173: putenv (mc_replace_strmem.c:743)
==3077==by 0x75088C: php_putenv_destructor (basic_functions.c: 
3822)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==  Address 0x8ea3d08 is 0 bytes inside a block of size 18  
free'd

==3077==at 0x4C2292E: free (vg_replace_malloc.c:323)
==3077==by 0x864AD6: _efree (zend_alloc.c:2291)
==3077==by 0x7508AE: php_putenv_destructor (basic_functions.c: 
3823)

==3077==by 0x89901B: zend_hash_destroy (zend_hash.c:526)
==3077==by 0x7514CC: zm_deactivate_basic (basic_functions.c:4143)
==3077==by 0x892D02: module_registry_cleanup (zend_API.c:2119)
==3077==by 0x899602: zend_hash_apply (zend_hash.c:673)
==3077==by 0x888B77: zend_deactivate_modules (zend.c:874)
==3077==by 0x813040: php_request_shutdown (main.c:1497)
==3077==by 0x92C04A: main (php_cli.c:1320)
==3077==
==3077== Invalid read of size 1
==3077==at 0x4C23DC6: strncmp (mc_replace_strmem.c:314)
==3077==by 0x85C3750: __add_to_environ (in 

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

2008-05-06 Thread Ilia Alshanetsky
iliaa   Tue May  6 18:01:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed bug #44836 (putenv() crashes, avoid direct reference of environ in
  POSIX systems)
  
  # Original patch by delphij at FreeBSD dot org
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.31r2=1.725.2.31.2.64.2.32diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.31 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.32
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.31 Mon May  5 
11:28:11 2008
+++ php-src/ext/standard/basic_functions.c  Tue May  6 18:01:32 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.31 2008/05/05 11:28:11 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.32 2008/05/06 18:01:32 iliaa Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -3820,9 +3820,7 @@
SetEnvironmentVariable(pe-key, bugbug);
 #endif
putenv(pe-previous_value);
-# if defined(PHP_WIN32)
efree(pe-previous_value);
-# endif
} else {
 # if HAVE_UNSETENV
unsetenv(pe-key);
@@ -4427,12 +4425,8 @@
pe.previous_value = NULL;
for (env = environ; env != NULL  *env != NULL; env++) {
if (!strncmp(*env, pe.key, pe.key_len)  
(*env)[pe.key_len] == '=') {  /* found it */
-#if defined(PHP_WIN32)
-   /* must copy previous value because MSVCRT's 
putenv can free the string without notice */
+   /* must copy previous value because putenv can 
free the string without notice */
pe.previous_value = estrdup(*env);
-#else
-   pe.previous_value = *env;
-#endif
break;
}
}



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-04-21 Thread Ilia Alshanetsky


On 20-Apr-08, at 11:21 AM, Hannes Magnusson wrote:

On Sun, Apr 20, 2008 at 5:07 PM, Ilia Alshanetsky [EMAIL PROTECTED]  
wrote:

iliaa   Sun Apr 20 15:07:39 2008 UTC

 Modified files:  (Branch: PHP_5_3)
   /php-src/ext/standard   basic_functions.c
 Log:
 Fixed a bug #44403 (register_tick_function() does not check for a  
valid callback)



http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.27r2=1.725.2.31.2.64.2.28diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27  
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 Tue  
Apr 15 09:02:40 2008
+++ php-src/ext/standard/basic_functions.c  Sun Apr 20 15:07:39  
2008

@@ -18,7 +18,7 @@

+ 
--+

 */

-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.27 2008/04/15  
09:02:40 jani Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.28 2008/04/20  
15:07:39 iliaa Exp $ */


 #include php.h
 #include php_streams.h
@@ -6045,6 +6045,7 @@
 {
   user_tick_function_entry tick_fe;
   int i;
+   char *function_name = NULL;

   tick_fe.calling = 0;
   tick_fe.arg_count = ZEND_NUM_ARGS();
@@ -6060,6 +6061,13 @@
   RETURN_FALSE;
   }

+   if (!zend_is_callable(tick_fe.arguments[0], 0,  
function_name)) {

+ efree(tick_fe.arguments);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid  
shutdown callback '%s' passed, function_name);


Copypaste typo? (shouldn't it say Invalid tick callback?)


+ efree(function_name);
+ RETURN_FALSE;
+   }
+


Didn't you forget to free function_name on success?



Good points, I'll apply the changes in a few minutes.

Ilia Alshanetsky





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



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

2008-04-21 Thread Ilia Alshanetsky
iliaa   Mon Apr 21 14:32:57 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed error verbiage and free function_name on success
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.28r2=1.725.2.31.2.64.2.29diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.29
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28 Sun Apr 20 
15:07:39 2008
+++ php-src/ext/standard/basic_functions.c  Mon Apr 21 14:32:57 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.28 2008/04/20 15:07:39 iliaa Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.29 2008/04/21 14:32:57 iliaa Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -6062,10 +6062,12 @@
}
 
if (!zend_is_callable(tick_fe.arguments[0], 0, function_name)) {
- efree(tick_fe.arguments);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid shutdown 
callback '%s' passed, function_name);
- efree(function_name);
- RETURN_FALSE;
+   efree(tick_fe.arguments);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid tick 
callback '%s' passed, function_name);
+   efree(function_name);
+   RETURN_FALSE;
+   } else if (function_name) {
+   efree(function_name);
}
 
if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY) {



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



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

2008-04-20 Thread Ilia Alshanetsky
iliaa   Sun Apr 20 15:07:39 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed a bug #44403 (register_tick_function() does not check for a valid 
callback)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.27r2=1.725.2.31.2.64.2.28diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 Tue Apr 15 
09:02:40 2008
+++ php-src/ext/standard/basic_functions.c  Sun Apr 20 15:07:39 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.27 2008/04/15 09:02:40 jani Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.28 2008/04/20 15:07:39 iliaa Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -6045,6 +6045,7 @@
 {
user_tick_function_entry tick_fe;
int i;
+   char *function_name = NULL;
 
tick_fe.calling = 0;
tick_fe.arg_count = ZEND_NUM_ARGS();
@@ -6060,6 +6061,13 @@
RETURN_FALSE;
}
 
+   if (!zend_is_callable(tick_fe.arguments[0], 0, function_name)) {
+ efree(tick_fe.arguments);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid shutdown 
callback '%s' passed, function_name);
+ efree(function_name);
+ RETURN_FALSE;
+   }
+
if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY) {
convert_to_string_ex(tick_fe.arguments[0]);
}



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-04-20 Thread Hannes Magnusson
On Sun, Apr 20, 2008 at 5:07 PM, Ilia Alshanetsky [EMAIL PROTECTED] wrote:
 iliaa   Sun Apr 20 15:07:39 2008 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/standard   basic_functions.c
   Log:
   Fixed a bug #44403 (register_tick_function() does not check for a valid 
 callback)


  
 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.27r2=1.725.2.31.2.64.2.28diff_format=u
  Index: php-src/ext/standard/basic_functions.c
  diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 
 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.28
  --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.27 Tue Apr 15 
 09:02:40 2008
  +++ php-src/ext/standard/basic_functions.c  Sun Apr 20 15:07:39 2008
  @@ -18,7 +18,7 @@
 +--+
   */

  -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.27 2008/04/15 09:02:40 jani 
 Exp $ */
  +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.28 2008/04/20 15:07:39 iliaa 
 Exp $ */

   #include php.h
   #include php_streams.h
  @@ -6045,6 +6045,7 @@
   {
 user_tick_function_entry tick_fe;
 int i;
  +   char *function_name = NULL;

 tick_fe.calling = 0;
 tick_fe.arg_count = ZEND_NUM_ARGS();
  @@ -6060,6 +6061,13 @@
 RETURN_FALSE;
 }

  +   if (!zend_is_callable(tick_fe.arguments[0], 0, function_name)) {
  + efree(tick_fe.arguments);
  + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid shutdown 
 callback '%s' passed, function_name);

Copypaste typo? (shouldn't it say Invalid tick callback?)

  + efree(function_name);
  + RETURN_FALSE;
  +   }
  +

Didn't you forget to free function_name on success?

-Hannes

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2008-04-20 Thread Antony Dovgal

On 20.04.2008 19:21, Hannes Magnusson wrote:

 +   if (!zend_is_callable(tick_fe.arguments[0], 0, function_name)) {
 + efree(tick_fe.arguments);
 + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid shutdown callback 
'%s' passed, function_name);


Copypaste typo? (shouldn't it say Invalid tick callback?)


 + efree(function_name);
 + RETURN_FALSE;
 +   }
 +


There is also a problem with WS.

--
Wbr, 
Antony Dovgal


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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h

2008-04-15 Thread Jani Taskinen
janiTue Apr 15 08:44:21 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c basic_functions.h 
  Log:
  MFH
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.25r2=1.725.2.31.2.64.2.26diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.25 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.26
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.25 Mon Apr 14 
15:32:42 2008
+++ php-src/ext/standard/basic_functions.c  Tue Apr 15 08:44:21 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.25 2008/04/14 15:32:42 bjori Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.26 2008/04/15 08:44:21 jani Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -958,6 +958,12 @@
ZEND_ARG_INFO(0, scanner_mode)
 ZEND_END_ARG_INFO()
 
+#if ZEND_DEBUG
+static
+ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
+ZEND_END_ARG_INFO()
+#endif
+ 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
ZEND_ARG_INFO(0, types)
@@ -6320,6 +6326,19 @@
 }
 /* }}} */
 
+#if ZEND_DEBUG
+/* This function returns an array of ALL valid ini options with values and 
+ *  is not the same as ini_get_all() which returns only registered ini 
options. Only useful for devs to debug php.ini scanner/parser! */
+PHP_FUNCTION(config_get_hash) /* {{{ */
+{
+   HashTable *hash = php_ini_get_configuration_hash();
+
+   array_init(return_value);
+   zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
add_config_entry_cb, 1, return_value TSRMLS_CC);
+}
+/* }}} */
+#endif
+
 static int copy_request_variable(void *pDest, int num_args, va_list args, 
zend_hash_key *hash_key) /* {{{ */
 {
zval *prefix, new_key;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.4.2.6.2.8r2=1.139.2.4.2.6.2.9diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.8 
php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.9
--- php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.8Mon Apr 14 
15:32:42 2008
+++ php-src/ext/standard/basic_functions.h  Tue Apr 15 08:44:21 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.8 2008/04/14 15:32:42 bjori Exp $ 
*/
+/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.9 2008/04/15 08:44:21 jani Exp $ */
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -127,6 +127,9 @@
 
 /* From the INI parser */
 PHP_FUNCTION(parse_ini_file);
+#if ZEND_DEBUG
+PHP_FUNCTION(config_get_hash);
+#endif
 
 PHP_FUNCTION(str_rot13);
 PHP_FUNCTION(stream_get_filters);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions ini_get_all.phpt

2008-04-14 Thread Hannes Magnusson
bjori   Mon Apr 14 15:32:43 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   ini_get_all.phpt 
/php-src/ext/standard   basic_functions.c basic_functions.h 
  Log:
  [DOC] Remove config_get_hash()  and add new boolean parameter to 
ini_get_all()
  to list ini entries key=current_value like config_get_hash() did.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/ini_get_all.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u
Index: php-src/ext/standard/tests/general_functions/ini_get_all.phpt
diff -u 
php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.1 
php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.2
--- php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.1   
Mon Oct  1 12:40:54 2007
+++ php-src/ext/standard/tests/general_functions/ini_get_all.phpt   Mon Apr 
14 15:32:42 2008
@@ -1,5 +1,8 @@
 --TEST--
 ini_get_all() tests
+--INI--
+pcre.backtrack_limit=10
+pcre.recursion_limit=10
 --SKIPIF--
 ?php if (!extension_loaded(reflection)) die(skip); ?
 --FILE--
@@ -10,6 +13,8 @@
 var_dump(ini_get_all(nosuchextension));
 var_dump(ini_get_all(reflection));
 var_dump(ini_get_all(pcre));
+var_dump(ini_get_all(pcre, false));
+var_dump(ini_get_all(reflection, false));
 
 var_dump(ini_get_all(, ));
 
@@ -45,7 +50,15 @@
 int(7)
   }
 }
+array(2) {
+  [pcre.backtrack_limit]=
+  string(6) 10
+  [pcre.recursion_limit]=
+  string(6) 10
+}
+array(0) {
+}
 
-Warning: ini_get_all() expects at most 1 parameter, 2 given in %s on line %d
-NULL
+Warning: ini_get_all(): Unable to find extension '' in %sini_get_all.php on 
line %d
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.24r2=1.725.2.31.2.64.2.25diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.24 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.25
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.24 Mon Apr  7 
10:44:59 2008
+++ php-src/ext/standard/basic_functions.c  Mon Apr 14 15:32:42 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.24 2008/04/07 10:44:59 colder 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.25 2008/04/14 15:32:42 bjori Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -959,10 +959,6 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
-ZEND_END_ARG_INFO()
-
-static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
ZEND_ARG_INFO(0, types)
ZEND_ARG_INFO(0, prefix)
@@ -3417,7 +3413,6 @@
PHP_FE(connection_status,   
arginfo_connection_status)
PHP_FE(ignore_user_abort,   
arginfo_ignore_user_abort)
PHP_FE(parse_ini_file,  
arginfo_parse_ini_file)
-   PHP_FE(config_get_hash, 
arginfo_config_get_hash)
PHP_FE(is_uploaded_file,
arginfo_is_uploaded_file)
PHP_FE(move_uploaded_file,  
arginfo_move_uploaded_file)
 
@@ -5663,6 +5658,7 @@
 {
zval *ini_array = va_arg(args, zval *);
int module_number = va_arg(args, int);
+   int details = va_arg(args, int);
zval *option;
 
if (module_number != 0  ini_entry-module_number != module_number) {
@@ -5672,40 +5668,49 @@
if (hash_key-nKeyLength == 0 ||
hash_key-arKey[0] != 0
) {
-   MAKE_STD_ZVAL(option);
-   array_init(option);
+   if (details) {
+   MAKE_STD_ZVAL(option);
+   array_init(option);
+
+   if (ini_entry-orig_value) {
+   add_assoc_stringl(option, global_value, 
ini_entry-orig_value, ini_entry-orig_value_length, 1);
+   } else if (ini_entry-value) {
+   add_assoc_stringl(option, global_value, 
ini_entry-value, ini_entry-value_length, 1);
+   } else {
+   add_assoc_null(option, global_value);
+   }
 
-   if (ini_entry-orig_value) {
-   add_assoc_stringl(option, global_value, 
ini_entry-orig_value, ini_entry-orig_value_length, 1);
-   } else if 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions ini_get_all.phpt

2008-04-14 Thread Jani Taskinen
Eh..do you really understand the code correctly..? ini_get_all() is very much 
different what config_dump_hash() was/is.


--Jani


Hannes Magnusson kirjoitti:

bjori   Mon Apr 14 15:32:43 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions	ini_get_all.phpt 
/php-src/ext/standard	basic_functions.c basic_functions.h 
  Log:

  [DOC] Remove config_get_hash()  and add new boolean parameter to 
ini_get_all()
  to list ini entries key=current_value like config_get_hash() did.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/ini_get_all.phpt?r1=1.1.2.2.2.1r2=1.1.2.2.2.2diff_format=u

Index: php-src/ext/standard/tests/general_functions/ini_get_all.phpt
diff -u 
php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.1 
php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.2
--- php-src/ext/standard/tests/general_functions/ini_get_all.phpt:1.1.2.2.2.1   
Mon Oct  1 12:40:54 2007
+++ php-src/ext/standard/tests/general_functions/ini_get_all.phpt   Mon Apr 
14 15:32:42 2008
@@ -1,5 +1,8 @@
 --TEST--
 ini_get_all() tests
+--INI--
+pcre.backtrack_limit=10
+pcre.recursion_limit=10
 --SKIPIF--
 ?php if (!extension_loaded(reflection)) die(skip); ?
 --FILE--
@@ -10,6 +13,8 @@
 var_dump(ini_get_all(nosuchextension));
 var_dump(ini_get_all(reflection));
 var_dump(ini_get_all(pcre));
+var_dump(ini_get_all(pcre, false));
+var_dump(ini_get_all(reflection, false));
 
 var_dump(ini_get_all(, ));
 
@@ -45,7 +50,15 @@

 int(7)
   }
 }
+array(2) {
+  [pcre.backtrack_limit]=
+  string(6) 10
+  [pcre.recursion_limit]=
+  string(6) 10
+}
+array(0) {
+}
 
-Warning: ini_get_all() expects at most 1 parameter, 2 given in %s on line %d

-NULL
+Warning: ini_get_all(): Unable to find extension '' in %sini_get_all.php on 
line %d
+bool(false)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.24r2=1.725.2.31.2.64.2.25diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.24 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.25
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.24 Mon Apr  7 
10:44:59 2008
+++ php-src/ext/standard/basic_functions.c  Mon Apr 14 15:32:42 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.24 2008/04/07 10:44:59 colder Exp $ */

+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.25 2008/04/14 15:32:42 bjori Exp 
$ */
 
 #include php.h

 #include php_streams.h
@@ -959,10 +959,6 @@
 ZEND_END_ARG_INFO()
 
 static

-ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
-ZEND_END_ARG_INFO()
-
-static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
ZEND_ARG_INFO(0, types)
ZEND_ARG_INFO(0, prefix)
@@ -3417,7 +3413,6 @@
PHP_FE(connection_status,   
arginfo_connection_status)
PHP_FE(ignore_user_abort,   
arginfo_ignore_user_abort)
PHP_FE(parse_ini_file,  
arginfo_parse_ini_file)
-   PHP_FE(config_get_hash, 
arginfo_config_get_hash)
PHP_FE(is_uploaded_file,
arginfo_is_uploaded_file)
PHP_FE(move_uploaded_file,  
arginfo_move_uploaded_file)
 
@@ -5663,6 +5658,7 @@

 {
zval *ini_array = va_arg(args, zval *);
int module_number = va_arg(args, int);
+   int details = va_arg(args, int);
zval *option;
 
 	if (module_number != 0  ini_entry-module_number != module_number) {

@@ -5672,40 +5668,49 @@
if (hash_key-nKeyLength == 0 ||
hash_key-arKey[0] != 0
) {
-   MAKE_STD_ZVAL(option);
-   array_init(option);
+   if (details) {
+   MAKE_STD_ZVAL(option);
+   array_init(option);
+
+   if (ini_entry-orig_value) {
+   add_assoc_stringl(option, global_value, 
ini_entry-orig_value, ini_entry-orig_value_length, 1);
+   } else if (ini_entry-value) {
+   add_assoc_stringl(option, global_value, 
ini_entry-value, ini_entry-value_length, 1);
+   } else {
+   add_assoc_null(option, global_value);
+   }
 
-		if (ini_entry-orig_value) {

-   

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions ini_get_all.phpt

2008-04-14 Thread Hannes Magnusson
On Mon, Apr 14, 2008 at 5:40 PM, Jani Taskinen [EMAIL PROTECTED] wrote:
 Eh..do you really understand the code correctly..? ini_get_all() is very
 much different what config_dump_hash() was/is.

Uhh.. I don't see the difference. And there are no tests to compare it against.
I already asked on internals@ and after no reply I tracked down helly
on IRC and he was fine with merging them.

-Hannes

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions ini_get_all.phpt

2008-04-14 Thread Jani Taskinen

Hannes Magnusson kirjoitti:

On Mon, Apr 14, 2008 at 5:40 PM, Jani Taskinen [EMAIL PROTECTED] wrote:

Eh..do you really understand the code correctly..? ini_get_all() is very
much different what config_dump_hash() was/is.


Uhh.. I don't see the difference. And there are no tests to compare it against.
I already asked on internals@ and after no reply I tracked down helly
on IRC and he was fine with merging them.


This function was originally just meant for debugging the config hash.
And hint for the difference is: registered vs. anything (that was freebie..)

Rule 1: Learn how to use CVS before you commit (hint: cvs annotate filename.ext)
Rule 2: Once you learned how to use CVS and figured out who to ask: ASK.
Rule 3: Ask the right people before committing.
Rule 4: IRC != internals@ (I haven't seen ANY question about this on internals!)

Now be good boy and revert the crap, that function is VERY useful for debugging 
how the php.ini stuff works (or not) and should be there. It was originally only 
enabled for debug builds and should always still be, I've no idea why Marcus 
made it enabled always in the first place..


--Jani


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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /ext/standard/tests/general_functions ini_get_all.phpt

2008-04-14 Thread Hannes Magnusson
On Mon, Apr 14, 2008 at 7:43 PM, Jani Taskinen [EMAIL PROTECTED] wrote:
 Hannes Magnusson kirjoitti:



  On Mon, Apr 14, 2008 at 5:40 PM, Jani Taskinen [EMAIL PROTECTED]
 wrote:
 
   Eh..do you really understand the code correctly..? ini_get_all() is very
   much different what config_dump_hash() was/is.
  
 
  Uhh.. I don't see the difference. And there are no tests to compare it
 against.
  I already asked on internals@ and after no reply I tracked down helly
  on IRC and he was fine with merging them.
 

  This function was originally just meant for debugging the config hash.
  And hint for the difference is: registered vs. anything (that was
 freebie..)

  Rule 1: Learn how to use CVS before you commit (hint: cvs annotate
 filename.ext)
  Rule 2: Once you learned how to use CVS and figured out who to ask: ASK.
  Rule 3: Ask the right people before committing.
  Rule 4: IRC != internals@ (I haven't seen ANY question about this on
 internals!)

  Now be good boy and revert the crap, that function is VERY useful for
 debugging how the php.ini stuff works (or not) and should be there. It was
 originally only enabled for debug builds and should always still be, I've no
 idea why Marcus made it enabled always in the first place..


Rule#1: Test the stuff you write, not only in your mind, with .phpt too
Rule#2: Make sure there are not more than 3 functions doing almost the
exact same thing.
Rule#3: Subscribe to internals@ and participate in the discussion of your work
Rule#4: Add comments about any hidden meanings behind the function
Rule#5: Add a frckin [DOC] note to the commit explaining how the stuff
works so it can be documented
Rule#6: If you write a function just to so it can be used when
debugging another internal feature add it in #ifdef FEATURE_DEBUG or
whatever so other people don't come after you and wonder wtf you were
thinking
Rule#7: If a documentor asks for clarifications on internals@ then help him
Rule#8: Do not reclassify bug-reports as documentation problem without
further information


If you don't tell anyone about what you are doing you cannot expect
anyone else to know what your intentions are. If the function should
be documented, removed, changed, only in debug mode, only there or
only here. Marcus apparently thought you made a booboo and renamed it
and enabled it in normal builds, and I seeing absolutely no point in
yet another ini-get function combined it with another function
seemingly serving the same purpose, in slightly different format...

I did ask on internals@ if we really did need yet-another-ini-get
function and since noone replied I followed your basic principle:
Commit and let the trolls flame.

-Hannes
(learned from the best! ;))

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /main main.c

2008-03-19 Thread Antony Dovgal
tony2001Wed Mar 19 12:42:16 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
/php-src/main   main.c 
  Log:
  MFH: make use of zend_atol()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.21r2=1.725.2.31.2.64.2.22diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.21 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.22
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.21 Mon Mar 10 
22:12:36 2008
+++ php-src/ext/standard/basic_functions.c  Wed Mar 19 12:42:16 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.21 2008/03/10 22:12:36 felipe 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.22 2008/03/19 12:42:16 tony2001 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6128,7 +6128,7 @@
}
 
if (!(Z_STRLEN_P(arg1)  1  Z_STRVAL_P(arg1)[0] == 
'0')  is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == 
IS_LONG) {
-   ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
+   ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), 
Z_STRLEN_P(arg1));
if (zend_hash_index_find(Z_ARRVAL_P(arr), key, 
(void **) find_hash) == FAILURE) {
ALLOC_ZVAL(hash);
INIT_PZVAL(hash);
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.57.2.17r2=1.640.2.23.2.57.2.18diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.57.2.17 
php-src/main/main.c:1.640.2.23.2.57.2.18
--- php-src/main/main.c:1.640.2.23.2.57.2.17Tue Mar 18 21:42:50 2008
+++ php-src/main/main.c Wed Mar 19 12:42:16 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.23.2.57.2.17 2008/03/18 21:42:50 rasmus Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.57.2.18 2008/03/19 12:42:16 tony2001 Exp $ */
 
 /* {{{ includes
  */
@@ -118,7 +118,7 @@
 static PHP_INI_MH(OnChangeMemoryLimit)
 {
if (new_value) {
-   PG(memory_limit) = zend_atoi(new_value, new_value_length);
+   PG(memory_limit) = zend_atol(new_value, new_value_length);
} else {
PG(memory_limit) = 130;   /* effectively, no 
limit */
}



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug44487.phpt

2008-03-19 Thread David Soria Parra
dsp Thu Mar 20 00:52:47 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   bug44487.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Fix bug #44487 (call_user_method_array issues a warning when throwing an 
exception).
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.22r2=1.725.2.31.2.64.2.23diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.22 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.23
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.22 Wed Mar 19 
12:42:16 2008
+++ php-src/ext/standard/basic_functions.c  Thu Mar 20 00:52:46 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.22 2008/03/19 12:42:16 tony2001 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.23 2008/03/20 00:52:46 dsp Exp $ 
*/
 
 #include php.h
 #include php_streams.h
@@ -5172,8 +5172,10 @@
 
convert_to_string(callback);
 
-   if (call_user_function_ex(EG(function_table), object, callback, 
retval_ptr, n_params, params, 0, NULL TSRMLS_CC) == SUCCESS  retval_ptr) {
-   COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+   if (call_user_function_ex(EG(function_table), object, callback, 
retval_ptr, n_params, params, 0, NULL TSRMLS_CC) == SUCCESS) {
+   if (retval_ptr) {
+   COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+   }
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to call 
%s(), Z_STRVAL_P(callback));
}
@@ -5214,8 +5216,10 @@
element++;
}
 
-   if (call_user_function_ex(EG(function_table), object, callback, 
retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS  
retval_ptr) {
-   COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+   if (call_user_function_ex(EG(function_table), object, callback, 
retval_ptr, num_elems, method_args, 0, NULL TSRMLS_CC) == SUCCESS) {
+   if (retval_ptr) {
+   COPY_PZVAL_TO_ZVAL(*return_value, retval_ptr);
+   }
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to call 
%s(), Z_STRVAL_P(callback));
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44487.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/bug44487.phpt
+++ php-src/ext/standard/tests/general_functions/bug44487.phpt
--TEST--
Bug #44487 (call_user_method_array issues a warning when throwing an exception)
--INI--
error_reporting = E_ALL  ~E_DEPRECATED
--FILE--
?php

class Foo
{
public function test()
{
print 'test';
throw new Exception();
}
}

try {
$bar = new Foo();
call_user_method_array('test', $bar, array()) ;
} catch (Exception $e) {
}
?
--EXPECT--
test



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h /main php_ini.c php_ini.h

2008-02-03 Thread Marcus Boerger
helly   Sun Feb  3 14:35:59 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c basic_functions.h 
/php-src/main   php_ini.c php_ini.h 
  Log:
  - MFH Rename dump_config_hash() to get_config_hash() as it doesn't dump
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.17r2=1.725.2.31.2.64.2.18diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.17 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.18
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.17 Fri Feb  1 
12:28:44 2008
+++ php-src/ext/standard/basic_functions.c  Sun Feb  3 14:35:58 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.17 2008/02/01 12:28:44 felipe 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.18 2008/02/03 14:35:58 helly Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -944,11 +944,9 @@
ZEND_ARG_INFO(0, scanner_mode)
 ZEND_END_ARG_INFO()
 
-#if ZEND_DEBUG
 static
-ZEND_BEGIN_ARG_INFO(arginfo_dump_config_hash, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
 ZEND_END_ARG_INFO()
-#endif
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_import_request_variables, 0, 0, 1)
@@ -3403,9 +3401,7 @@
PHP_FE(connection_status,   
arginfo_connection_status)
PHP_FE(ignore_user_abort,   
arginfo_ignore_user_abort)
PHP_FE(parse_ini_file,  
arginfo_parse_ini_file)
-#if ZEND_DEBUG
-   PHP_FE(dump_config_hash,
arginfo_dump_config_hash)
-#endif
+   PHP_FE(get_config_hash, 
arginfo_get_config_hash)
PHP_FE(is_uploaded_file,
arginfo_is_uploaded_file)
PHP_FE(move_uploaded_file,  
arginfo_move_uploaded_file)
 
@@ -6233,18 +6229,16 @@
 }
 /* }}} */
 
-#if ZEND_DEBUG
-/* {{{ proto void dump_config_hash(void)
+/* {{{ proto array get_config_hash(void)
  */
-PHP_FUNCTION(dump_config_hash)
+PHP_FUNCTION(get_config_hash)
 {
-   HashTable hash = get_configuration_hash();
+   HashTable *hash = php_ini_get_configuration_hash();
 
array_init(return_value);
-   zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
add_config_entry_cb, 1, return_value TSRMLS_CC);
+   zend_hash_apply_with_arguments(hash, (apply_func_args_t) 
add_config_entry_cb, 1, return_value TSRMLS_CC);
 }
 /* }}} */
-#endif
 
 static int copy_request_variable(void *pDest, int num_args, va_list args, 
zend_hash_key *hash_key) /* {{{ */
 {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.4.2.6.2.4r2=1.139.2.4.2.6.2.5diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.4 
php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.5
--- php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.4Mon Dec 31 
07:17:14 2007
+++ php-src/ext/standard/basic_functions.h  Sun Feb  3 14:35:59 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.4 2007/12/31 07:17:14 sebastian 
Exp $ */
+/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.5 2008/02/03 14:35:59 helly Exp $ 
*/
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -125,9 +125,7 @@
 
 /* From the INI parser */
 PHP_FUNCTION(parse_ini_file);
-#if ZEND_DEBUG
 PHP_FUNCTION(dump_config_hash);
-#endif
 
 PHP_FUNCTION(str_rot13);
 PHP_FUNCTION(stream_get_filters);
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.15.2.6r2=1.136.2.4.2.15.2.7diff_format=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.136.2.4.2.15.2.6 
php-src/main/php_ini.c:1.136.2.4.2.15.2.7
--- php-src/main/php_ini.c:1.136.2.4.2.15.2.6   Mon Dec 31 07:17:17 2007
+++ php-src/main/php_ini.c  Sun Feb  3 14:35:59 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.136.2.4.2.15.2.6 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_ini.c,v 1.136.2.4.2.15.2.7 2008/02/03 14:35:59 helly Exp $ */
 
 #include php.h
 #include ext/standard/info.h
@@ -840,13 +840,10 @@
 }
 /* }}} */
 
-#if ZEND_DEBUG
-#include php_ini.h
-PHPAPI HashTable 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c basic_functions.h

2008-02-03 Thread Marcus Boerger
helly   Sun Feb  3 14:45:00 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c basic_functions.h 
  Log:
  - MFH Rename it again
  [DOC]
  - MFH Add config_get_hash()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.18r2=1.725.2.31.2.64.2.19diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.18 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.19
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.18 Sun Feb  3 
14:35:58 2008
+++ php-src/ext/standard/basic_functions.c  Sun Feb  3 14:44:59 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.18 2008/02/03 14:35:58 helly Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.19 2008/02/03 14:44:59 helly Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -945,7 +945,7 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_get_config_hash, 0)
+ZEND_BEGIN_ARG_INFO(arginfo_config_get_hash, 0)
 ZEND_END_ARG_INFO()
 
 static
@@ -3401,7 +3401,7 @@
PHP_FE(connection_status,   
arginfo_connection_status)
PHP_FE(ignore_user_abort,   
arginfo_ignore_user_abort)
PHP_FE(parse_ini_file,  
arginfo_parse_ini_file)
-   PHP_FE(get_config_hash, 
arginfo_get_config_hash)
+   PHP_FE(config_get_hash, 
arginfo_config_get_hash)
PHP_FE(is_uploaded_file,
arginfo_is_uploaded_file)
PHP_FE(move_uploaded_file,  
arginfo_move_uploaded_file)
 
@@ -6229,9 +6229,9 @@
 }
 /* }}} */
 
-/* {{{ proto array get_config_hash(void)
- */
-PHP_FUNCTION(get_config_hash)
+/* {{{ proto array config_get_hash(void)
+ Return all configuration valus as an array */
+PHP_FUNCTION(config_get_hash)
 {
HashTable *hash = php_ini_get_configuration_hash();
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.h?r1=1.139.2.4.2.6.2.5r2=1.139.2.4.2.6.2.6diff_format=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.5 
php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.6
--- php-src/ext/standard/basic_functions.h:1.139.2.4.2.6.2.5Sun Feb  3 
14:35:59 2008
+++ php-src/ext/standard/basic_functions.h  Sun Feb  3 14:45:00 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.5 2008/02/03 14:35:59 helly Exp $ 
*/
+/* $Id: basic_functions.h,v 1.139.2.4.2.6.2.6 2008/02/03 14:45:00 helly Exp $ 
*/
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -125,7 +125,7 @@
 
 /* From the INI parser */
 PHP_FUNCTION(parse_ini_file);
-PHP_FUNCTION(dump_config_hash);
+PHP_FUNCTION(config_get_hash);
 
 PHP_FUNCTION(str_rot13);
 PHP_FUNCTION(stream_get_filters);

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c string.c

2008-02-01 Thread Felipe Pena
felipe  Fri Feb  1 12:28:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   string.c basic_functions.c 
  Log:
  MFH: New parameter 'before_needle'
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.13r2=1.445.2.14.2.69.2.14diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.13 
php-src/ext/standard/string.c:1.445.2.14.2.69.2.14
--- php-src/ext/standard/string.c:1.445.2.14.2.69.2.13  Fri Jan 25 01:31:10 2008
+++ php-src/ext/standard/string.c   Fri Feb  1 12:28:43 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.69.2.13 2008/01/25 01:31:10 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.69.2.14 2008/02/01 12:28:43 felipe Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1687,7 +1687,7 @@
 }
 /* }}} */
 
-/* {{{ proto string stristr(string haystack, string needle)
+/* {{{ proto string stristr(string haystack, string needle[, bool part])
Finds first occurrence of a string within another, case insensitive */
 PHP_FUNCTION(stristr)
 {
@@ -1696,9 +1696,10 @@
int  found_offset;
char *haystack_orig;
char needle_char[2];
+   zend_bool part = 0;

-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
needle) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ZZ|b, haystack, 
needle, part) == FAILURE) {
+   return;
}
 
SEPARATE_ZVAL(haystack);
@@ -1732,7 +1733,11 @@
 
if (found) {
found_offset = found - Z_STRVAL_PP(haystack);
-   RETVAL_STRINGL(haystack_orig + found_offset, 
Z_STRLEN_PP(haystack) - found_offset, 1);
+   if (part) {
+   RETVAL_STRINGL(haystack_orig, found_offset, 1);
+   } else {
+   RETVAL_STRINGL(haystack_orig + found_offset, 
Z_STRLEN_PP(haystack) - found_offset, 1);
+   }   
} else {
RETVAL_FALSE;
}
@@ -1741,7 +1746,7 @@
 }
 /* }}} */
 
-/* {{{ proto string strstr(string haystack, string needle)
+/* {{{ proto string strstr(string haystack, string needle[, bool part])
Finds first occurrence of a string within another */
 PHP_FUNCTION(strstr)
 {
@@ -1749,9 +1754,10 @@
char *found = NULL;
char needle_char[2];
long found_offset;
+   zend_bool part = 0;

-   if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, haystack, 
needle) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ZZ|b, haystack, 
needle, part) == FAILURE) {
+   return;
}
 
convert_to_string_ex(haystack);
@@ -1779,7 +1785,11 @@
 
if (found) {
found_offset = found - Z_STRVAL_PP(haystack);
-   RETURN_STRINGL(found, Z_STRLEN_PP(haystack) - found_offset, 1);
+   if (part) {
+   RETURN_STRINGL(Z_STRVAL_PP(haystack), found_offset, 1);
+   } else {
+   RETURN_STRINGL(found, Z_STRLEN_PP(haystack) - 
found_offset, 1);
+   }
} else {
RETURN_FALSE;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.16r2=1.725.2.31.2.64.2.17diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.16 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.17
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.16 Sat Jan 19 
19:27:21 2008
+++ php-src/ext/standard/basic_functions.c  Fri Feb  1 12:28:44 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.16 2008/01/19 19:27:21 davidc 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.17 2008/02/01 12:28:44 felipe 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2536,15 +2536,17 @@
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_stristr, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_stristr, 0, 0, 2)
ZEND_ARG_INFO(0, haystack)
ZEND_ARG_INFO(0, needle)
+   ZEND_ARG_INFO(0, part)
 ZEND_END_ARG_INFO()
 
 static
-ZEND_BEGIN_ARG_INFO(arginfo_strstr, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_strstr, 0, 0, 2)
ZEND_ARG_INFO(0, haystack)
ZEND_ARG_INFO(0, needle)
+   ZEND_ARG_INFO(0, part)
 ZEND_END_ARG_INFO()
 
 static

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c php_string.h string.c /ext/standard/tests/strings lcfirst.phpt

2008-01-19 Thread David Coallier
davidc  Sat Jan 19 19:27:22 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/strings lcfirst.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c php_string.h string.c 
  Log:
  - MFH (lcfirst())
  - Initial test for lcfirst
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.15r2=1.725.2.31.2.64.2.16diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.15 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.16
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.15 Mon Dec 31 
07:17:14 2007
+++ php-src/ext/standard/basic_functions.c  Sat Jan 19 19:27:21 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.15 2007/12/31 07:17:14 sebastian 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.16 2008/01/19 19:27:21 davidc 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -2624,6 +2624,11 @@
 ZEND_END_ARG_INFO()
 
 static
+ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
+   ZEND_ARG_INFO(0, str)
+ZEND_END_ARG_INFO()
+   
+static
 ZEND_BEGIN_ARG_INFO(arginfo_ucwords, 0)
ZEND_ARG_INFO(0, str)
 ZEND_END_ARG_INFO()
@@ -3148,6 +3153,7 @@
PHP_FE(substr_replace,  
arginfo_substr_replace)
PHP_FE(quotemeta,   
arginfo_quotemeta)
PHP_FE(ucfirst, 
arginfo_ucfirst)
+   PHP_FE(lcfirst, 
arginfo_lcfirst)
PHP_FE(ucwords, 
arginfo_ucwords)
PHP_FE(strtr,   
arginfo_strtr)
PHP_FE(addslashes,  
arginfo_addslashes)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/php_string.h?r1=1.87.2.2.2.3.2.1r2=1.87.2.2.2.3.2.2diff_format=u
Index: php-src/ext/standard/php_string.h
diff -u php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.1 
php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.2
--- php-src/ext/standard/php_string.h:1.87.2.2.2.3.2.1  Mon Dec 31 07:17:15 2007
+++ php-src/ext/standard/php_string.h   Sat Jan 19 19:27:21 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_string.h,v 1.87.2.2.2.3.2.1 2007/12/31 07:17:15 sebastian Exp $ */
+/* $Id: php_string.h,v 1.87.2.2.2.3.2.2 2008/01/19 19:27:21 davidc Exp $ */
 
 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
 
@@ -53,6 +53,7 @@
 PHP_FUNCTION(substr);
 PHP_FUNCTION(quotemeta);
 PHP_FUNCTION(ucfirst);
+PHP_FUNCTION(lcfirst);
 PHP_FUNCTION(ucwords);
 PHP_FUNCTION(strtr);
 PHP_FUNCTION(strrev);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.69.2.10r2=1.445.2.14.2.69.2.11diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.69.2.10 
php-src/ext/standard/string.c:1.445.2.14.2.69.2.11
--- php-src/ext/standard/string.c:1.445.2.14.2.69.2.10  Wed Jan 16 08:34:33 2008
+++ php-src/ext/standard/string.c   Sat Jan 19 19:27:21 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.69.2.10 2008/01/16 08:34:33 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.69.2.11 2008/01/19 19:27:21 davidc Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2646,6 +2646,36 @@
 }
 /* }}} */
 
+/* {{{
+   Lowercase the first character of the word in a native string */
+static void php_lcfirst(char *str)
+{
+   register char *r;
+   r = str;
+   *r = tolower((unsigned char) *r);
+}
+/* }}} */
+
+/* {{{ proto string ucfirst(string str)
+   Make a string's first character lowercase */
+PHP_FUNCTION(lcfirst)
+{
+   char  *str;
+   int   str_len;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, str, 
str_len) == FAILURE) {
+   return;
+   }
+
+   if (!str_len) {
+   RETURN_EMPTY_STRING();
+   }
+
+   ZVAL_STRINGL(return_value, str, str_len, 1);
+   php_lcfirst(Z_STRVAL_P(return_value));
+}
+/* }}} */
+
 /* {{{ proto string ucwords(string str)
Uppercase the first character of every word in a string */
 PHP_FUNCTION(ucwords)


[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions getopt_002.phpt getopt_003.phpt

2007-11-15 Thread Hannes Magnusson
bjori   Thu Nov 15 13:13:21 2007 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   getopt_002.phpt 
getopt_003.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: Allow numeric options  tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.11r2=1.725.2.31.2.64.2.12diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.11 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.12
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.11 Wed Nov 14 
14:42:25 2007
+++ php-src/ext/standard/basic_functions.c  Thu Nov 15 13:13:21 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.11 2007/11/14 14:42:25 bjori Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.12 2007/11/15 13:13:21 bjori Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -4506,7 +4506,8 @@
int i, count = 0;
 
for (i = 0; i  strlen(opts); i++) {
-   if ((opts[i] = 65  opts[i] = 90) ||
+   if ((opts[i] = 48  opts[i] = 57) ||
+   (opts[i] = 65  opts[i] = 90) ||
(opts[i] = 97  opts[i] = 122)
) {
count++;
@@ -4516,8 +4517,9 @@
paras = safe_emalloc(sizeof(opt_struct), count, 0);
memset(paras, 0, sizeof(opt_struct) * count);
*result = paras;
-   while ( (*opts = 65  *opts = 90) ||
-   (*opts = 97  *opts = 122)
+   while ( (*opts = 48  *opts = 57) || /* 0 - 9 */
+   (*opts = 65  *opts = 90) || /* A - Z */
+   (*opts = 97  *opts = 122)   /* a - z */
) {
paras-opt_char = *opts;
paras-need_param = (*(++opts) == ':') ? 1 : 0;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getopt_002.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/getopt_002.phpt
+++ php-src/ext/standard/tests/general_functions/getopt_002.phpt
--TEST--
getopt#002
--ARGS--
-vvv -a value - -2 -v
--INI--
register_argc_argv=On
variables_order=GPS
--FILE--
?php
var_dump(getopt(2a:vcd1));
?
--EXPECT--
array(4) {
  [v]=
  array(4) {
[0]=
bool(false)
[1]=
bool(false)
[2]=
bool(false)
[3]=
bool(false)
  }
  [a]=
  string(5) value
  [1]=
  array(4) {
[0]=
bool(false)
[1]=
bool(false)
[2]=
bool(false)
[3]=
bool(false)
  }
  [2]=
  bool(false)
}



http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/getopt_003.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/getopt_003.phpt
+++ php-src/ext/standard/tests/general_functions/getopt_003.phpt
--TEST--
getopt#003
--ARGS--
-vvv --v -a value --another value - -2 --12 --0 --0 --1 -v
--INI--
register_argc_argv=On
variables_order=GPS
--FILE--
?php
var_dump(getopt(2a:vcd1, array(another:, 12, 0, 1, v)));
?
--EXPECT--
array(7) {
  [v]=
  array(5) {
[0]=
bool(false)
[1]=
bool(false)
[2]=
bool(false)
[3]=
bool(false)
[4]=
bool(false)
  }
  [a]=
  string(5) value
  [another]=
  string(5) value
  [1]=
  array(5) {
[0]=
bool(false)
[1]=
bool(false)
[2]=
bool(false)
[3]=
bool(false)
[4]=
bool(false)
  }
  [2]=
  bool(false)
  [12]=
  bool(false)
  [0]=
  array(2) {
[0]=
bool(false)
[1]=
bool(false)
  }
}

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug43293_1.phpt bug43293_2.phpt bug43293_3.phpt

2007-11-14 Thread Hannes Magnusson
bjori   Wed Nov 14 14:42:26 2007 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   bug43293_1.phpt 
bug43293_2.phpt 
bug43293_3.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed bug#43293 (Multiple segfaults in getopt())
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.10r2=1.725.2.31.2.64.2.11diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.10 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.11
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.10 Tue Nov  6 
12:12:58 2007
+++ php-src/ext/standard/basic_functions.c  Wed Nov 14 14:42:25 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.10 2007/11/06 12:12:58 helly Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.11 2007/11/14 14:42:25 bjori Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -4552,11 +4552,11 @@
/* Get argv from the global symbol table. We calculate argc ourselves
 * in order to be on the safe side, even though it is also available
 * from the symbol table. */
-   if (zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), 
argv, sizeof(argv), (void **) args) != FAILURE ||
-   zend_hash_find(EG(symbol_table), argv, sizeof(argv), (void 
**) args) != FAILURE
+   if ((zend_hash_find(HASH_OF(PG(http_globals)[TRACK_VARS_SERVER]), 
argv, sizeof(argv), (void **) args) != FAILURE ||
+   zend_hash_find(EG(symbol_table), argv, sizeof(argv), (void 
**) args) != FAILURE)  Z_TYPE_PP(args) == IS_ARRAY
) {
int pos = 0;
-   zval **arg;
+   zval **entry;
 
argc = zend_hash_num_elements(Z_ARRVAL_PP(args));
 
@@ -4568,8 +4568,22 @@
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args));
 
/* Iterate over the hash to construct the argv array. */
-   while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void 
**)arg) == SUCCESS) {
-   argv[pos++] = estrdup(Z_STRVAL_PP(arg));
+   while (zend_hash_get_current_data(Z_ARRVAL_PP(args), (void 
**)entry) == SUCCESS) {
+   zval arg, *arg_ptr = *entry;
+
+   if (Z_TYPE_PP(entry) != IS_STRING) {
+   arg = **entry;
+   zval_copy_ctor(arg);
+   convert_to_string(arg);
+   arg_ptr = arg;
+   }
+
+   argv[pos++] = estrdup(Z_STRVAL_P(arg_ptr));
+
+   if (arg_ptr != *entry) {
+   zval_dtor(arg);
+   }
+
zend_hash_move_forward(Z_ARRVAL_PP(args));
}
 
@@ -4585,7 +4599,7 @@
 
if (p_longopts) {
int count;
-   zval **arg;
+   zval **entry;
 
count = zend_hash_num_elements(Z_ARRVAL_P(p_longopts));
 
@@ -4605,9 +4619,18 @@
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p_longopts));
 
/* Iterate over the hash to construct the argv array. */
-   while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void 
**)arg) == SUCCESS) {
+   while (zend_hash_get_current_data(Z_ARRVAL_P(p_longopts), (void 
**)entry) == SUCCESS) {
+   zval arg, *arg_ptr = *entry;
+
+   if (Z_TYPE_PP(entry) != IS_STRING) {
+   arg = **entry;
+   zval_copy_ctor(arg);
+   convert_to_string(arg);
+   arg_ptr = arg;
+   }
+
opts-need_param = 0;
-   opts-opt_name = estrdup(Z_STRVAL_PP(arg));
+   opts-opt_name = estrdup(Z_STRVAL_P(arg_ptr));
len = strlen(opts-opt_name);
if ((len  0)  (opts-opt_name[len - 1] == ':')) {
opts-need_param++;
@@ -4619,6 +4642,11 @@
}
opts-opt_char = 0;
opts++;
+
+   if (arg_ptr != *entry) {
+   zval_dtor(arg);
+   }
+
zend_hash_move_forward(Z_ARRVAL_P(p_longopts));
}
} else {

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug43293_1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/general_functions/bug43293_1.phpt

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

2007-10-22 Thread Dmitry Stogov
dmitry  Mon Oct 22 07:37:37 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Fixed move_uploaded_file() to always set file permissions of resulting file 
according to UMASK (Andrew Sitnikov)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.7r2=1.725.2.31.2.64.2.8diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.7 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.8
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.7  Sun Oct  7 
05:22:06 2007
+++ php-src/ext/standard/basic_functions.c  Mon Oct 22 07:37:37 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.7 2007/10/07 05:22:06 davidw Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.8 2007/10/22 07:37:37 dmitry Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -53,6 +53,11 @@
 #include time.h
 #include stdio.h
 
+#ifndef PHP_WIN32 
+#include sys/types.h
+#include sys/stat.h
+#endif
+
 #ifdef NETWARE
 #include netinet/in.h
 #endif
@@ -6061,6 +6066,10 @@
int path_len, new_path_len;
zend_bool successful = 0;
 
+#ifndef PHP_WIN32
+   int oldmask; int ret;
+#endif
+
if (!SG(rfc1867_uploaded_files)) {
RETURN_FALSE;
}
@@ -6084,6 +6093,16 @@
VCWD_UNLINK(new_path);
if (VCWD_RENAME(path, new_path) == 0) {
successful = 1;
+#ifndef PHP_WIN32
+   oldmask = umask(077);
+   umask(oldmask);
+
+   ret = VCWD_CHMOD(new_path, 0666  ~oldmask);
+
+   if (ret == -1) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, 
strerror(errno));
+   }
+#endif
} else if (php_copy_file_ex(path, new_path, STREAM_DISABLE_OPEN_BASEDIR 
TSRMLS_CC) == SUCCESS) {
VCWD_UNLINK(path);
successful = 1;

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c

2007-10-02 Thread Jani Taskinen
Nice catch. :)

--Jani

On Mon, 2007-10-01 at 20:36 +, Johannes Schlüter wrote:
 johannes  Mon Oct  1 20:36:01 2007 UTC
 
   Modified files:  (Branch: PHP_5_3)
 /php-src/ext/standard basic_functions.c 
   Log:
   - pass the adress not the value
   
 http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.4r2=1.725.2.31.2.64.2.5diff_format=u
 Index: php-src/ext/standard/basic_functions.c
 diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.4 
 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.5
 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.4Mon Oct 
  1 12:40:53 2007
 +++ php-src/ext/standard/basic_functions.cMon Oct  1 20:36:01 2007
 @@ -17,7 +17,7 @@
 +--+
   */
  
 -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.4 2007/10/01 12:40:53 jani Exp 
 $ */
 +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.5 2007/10/01 20:36:01 johannes 
 Exp $ */
  
  #include php.h
  #include php_streams.h
 @@ -6125,7 +6125,7 @@
   RETURN_FALSE;
   }
  
 - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, path, 
 path_len, new_path, new_path_len) == FAILURE) {
 + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, path, 
 path_len, new_path, new_path_len) == FAILURE) {
   return;
   }
  
 
-- 
Patches/Donations: http://pecl.php.net/~jani/

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



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

2007-10-01 Thread Johannes Schl
johannesMon Oct  1 20:36:01 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  - pass the adress not the value
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.4r2=1.725.2.31.2.64.2.5diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.4 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.5
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.4  Mon Oct  1 
12:40:53 2007
+++ php-src/ext/standard/basic_functions.c  Mon Oct  1 20:36:01 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.4 2007/10/01 12:40:53 jani Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.5 2007/10/01 20:36:01 johannes 
Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -6125,7 +6125,7 @@
RETURN_FALSE;
}
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, path, 
path_len, new_path, new_path_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss, path, 
path_len, new_path, new_path_len) == FAILURE) {
return;
}
 

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



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

2007-09-28 Thread Dmitry Stogov
dmitry  Fri Sep 28 19:53:42 2007 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   basic_functions.c 
  Log:
  Support for namespaces
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.2r2=1.725.2.31.2.64.2.3diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.2 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.3
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.2  Fri Sep 28 
02:05:08 2007
+++ php-src/ext/standard/basic_functions.c  Fri Sep 28 19:53:42 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.2 2007/09/28 02:05:08 jani Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.3 2007/09/28 19:53:42 dmitry Exp 
$ */
 
 #include php.h
 #include php_streams.h
@@ -4256,7 +4256,7 @@
}
convert_to_string_ex(const_name);
 
-   if (!zend_get_constant(Z_STRVAL_PP(const_name), 
Z_STRLEN_PP(const_name), return_value TSRMLS_CC)) {
+   if (!zend_get_constant_ex(Z_STRVAL_PP(const_name), 
Z_STRLEN_PP(const_name), return_value, NULL, 0 TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Couldn't find 
constant %s, Z_STRVAL_PP(const_name));
RETURN_NULL();
}

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