[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_interface.phpt trunk/ext/pdo_mysql/tests/pdo_mysql_interface.phpt

2010-08-30 Thread Ulf Wendel
uw   Mon, 30 Aug 2010 09:20:48 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302882

Log:
If you add functions to the PDO core, take care not to break other PDO drivers 
tests, document the function and provide a function test for the PDO core to 
check your default/fallback implementation.

Changed paths:
U   
php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_interface.phpt
U   php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_interface.phpt

Modified: 
php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_interface.phpt
===
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_interface.phpt   
2010-08-30 07:21:28 UTC (rev 302881)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/tests/pdo_mysql_interface.phpt   
2010-08-30 09:20:48 UTC (rev 302882)
@@ -14,20 +14,21 @@
$db = MySQLPDOTest::factory();

$expected = array(
-   '__construct'   = true,
-   'prepare'   = true,
-   'beginTransaction'  = true,
+   '__construct'   
= true,
+   'prepare'   
= true,
+   'beginTransaction'  
= true,
'commit'
= true,
-   'rollBack'  = true,
-   'setAttribute'  = true,
+   'rollBack'  
= true,
+   'setAttribute'  
= true,
'exec'  
= true,
'query' 
= true,
-   'lastInsertId'  = true,
-   'errorCode' = true,
-   'errorInfo' = true,
-   'getAttribute'  = true,
+   'lastInsertId'  
= true,
+   'errorCode' 
= true,
+   'errorInfo' 
= true,
+   'getAttribute'  
= true,
'quote' 
= true,
-   '__wakeup'  = true,
+   'inTransaction' 
= true,
+   '__wakeup'  
= true,
'__sleep'   
= true,
'getAvailableDrivers'   = true,
);
@@ -55,4 +56,4 @@

print done!;
 --EXPECT--
-done!
\ No newline at end of file
+done!

Modified: php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_interface.phpt
===
--- php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_interface.phpt  
2010-08-30 07:21:28 UTC (rev 302881)
+++ php/php-src/trunk/ext/pdo_mysql/tests/pdo_mysql_interface.phpt  
2010-08-30 09:20:48 UTC (rev 302882)
@@ -14,20 +14,21 @@
$db = MySQLPDOTest::factory();

$expected = array(
-   '__construct'   = true,
-   'prepare'   = true,
-   'beginTransaction'  = true,
+   '__construct'   
= true,
+   'prepare'   
= true,
+   'beginTransaction'  
= true,
'commit'
= true,
-   'rollBack'  = true,
-   'setAttribute'  = true,
+   'rollBack'  
= true,
+   'setAttribute'  
= true,
'exec'  
= true,
'query' 
= true,
-   'lastInsertId'  = true,
-   'errorCode' = true,
-   'errorInfo'

[PHP-CVS] svn: /php/php-src/trunk/ TSRM/tsrm_virtual_cwd.c TSRM/tsrm_virtual_cwd.h UPGRADING ext/zip/php_zip.c main/fopen_wrappers.c main/php_open_temporary_file.c

2010-08-30 Thread Pierre Joye
pajoye   Mon, 30 Aug 2010 09:38:47 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302883

Log:
- use TSRMLS_CC instead of TSRMLS_FETCH in virtual_file_ex

Changed paths:
U   php/php-src/trunk/TSRM/tsrm_virtual_cwd.c
U   php/php-src/trunk/TSRM/tsrm_virtual_cwd.h
U   php/php-src/trunk/UPGRADING
U   php/php-src/trunk/ext/zip/php_zip.c
U   php/php-src/trunk/main/fopen_wrappers.c
U   php/php-src/trunk/main/php_open_temporary_file.c

Modified: php/php-src/trunk/TSRM/tsrm_virtual_cwd.c
===
--- php/php-src/trunk/TSRM/tsrm_virtual_cwd.c	2010-08-30 09:20:48 UTC (rev 302882)
+++ php/php-src/trunk/TSRM/tsrm_virtual_cwd.c	2010-08-30 09:38:47 UTC (rev 302883)
@@ -990,7 +990,7 @@

 /* Resolve path relatively to state and put the real path into state */
 /* returns 0 for ok, 1 for error */
-CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath) /* {{{ */
+CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath TSRMLS_DC) /* {{{ */
 {
 	int path_length = strlen(path);
 	char resolved_path[MAXPATHLEN];
@@ -1000,7 +1000,6 @@
 	int ret;
 	int add_slash;
 	void *tmp;
-	TSRMLS_FETCH();

 	if (path_length == 0 || path_length = MAXPATHLEN-1) {
 #ifdef TSRM_WIN32
@@ -1196,7 +1195,7 @@

 CWD_API int virtual_chdir(const char *path TSRMLS_DC) /* {{{ */
 {
-	return virtual_file_ex(CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH)?-1:0;
+	return virtual_file_ex(CWDG(cwd), path, php_is_dir_ok, CWD_REALPATH TSRMLS_CC)?-1:0;
 }
 /* }}} */

@@ -1256,7 +1255,7 @@
 		new_state.cwd_length = 0;
 	}

-	if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH)==0) {
+	if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH TSRMLS_CC)==0) {
 		int len = new_state.cwd_lengthMAXPATHLEN-1?MAXPATHLEN-1:new_state.cwd_length;

 		memcpy(real_path, new_state.cwd, len);
@@ -1278,7 +1277,7 @@
 	int retval;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	retval = virtual_file_ex(new_state, path, verify_path, CWD_FILEPATH);
+	retval = virtual_file_ex(new_state, path, verify_path, CWD_FILEPATH TSRMLS_CC);

 	*filepath = new_state.cwd;

@@ -1303,7 +1302,7 @@
 	}

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) {
+	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return NULL;
 	}
@@ -1321,7 +1320,7 @@
 	int ret;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, pathname, NULL, CWD_REALPATH)) {
+	if (virtual_file_ex(new_state, pathname, NULL, CWD_REALPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1394,7 +1393,7 @@
 	int ret;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) {
+	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1417,7 +1416,7 @@
 	int ret;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) {
+	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1436,7 +1435,7 @@
 	int ret;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH)) {
+	if (virtual_file_ex(new_state, filename, NULL, CWD_REALPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1463,7 +1462,7 @@
 	int f;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) {
+	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1491,7 +1490,7 @@
 	int f;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH)) {
+	if (virtual_file_ex(new_state, path, NULL, CWD_FILEPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1510,14 +1509,14 @@
 	int retval;

 	CWD_STATE_COPY(old_state, CWDG(cwd));
-	if (virtual_file_ex(old_state, oldname, NULL, CWD_EXPAND)) {
+	if (virtual_file_ex(old_state, oldname, NULL, CWD_EXPAND TSRMLS_CC)) {
 		CWD_STATE_FREE(old_state);
 		return -1;
 	}
 	oldname = old_state.cwd;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, newname, NULL, CWD_EXPAND)) {
+	if (virtual_file_ex(new_state, newname, NULL, CWD_EXPAND TSRMLS_CC)) {
 		CWD_STATE_FREE(old_state);
 		CWD_STATE_FREE(new_state);
 		return -1;
@@ -1546,7 +1545,7 @@
 	int retval;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH)) {
+	if (virtual_file_ex(new_state, path, NULL, CWD_REALPATH TSRMLS_CC)) {
 		CWD_STATE_FREE(new_state);
 		return -1;
 	}
@@ -1565,7 +1564,7 @@
 	int retval;

 	CWD_STATE_COPY(new_state, CWDG(cwd));
-	if (virtual_file_ex(new_state, path, NULL, 

[PHP-CVS] svn: /php/php-src/trunk/ UPGRADING

2010-08-30 Thread Pierre Joye
pajoye   Mon, 30 Aug 2010 10:27:03 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302885

Log:
- remove internals stuff, moved to the INTERNALS guide

Changed paths:
U   php/php-src/trunk/UPGRADING

Modified: php/php-src/trunk/UPGRADING
===
--- php/php-src/trunk/UPGRADING 2010-08-30 10:26:31 UTC (rev 302884)
+++ php/php-src/trunk/UPGRADING 2010-08-30 10:27:03 UTC (rev 302885)
@@ -28,7 +28,6 @@
  h. New methods
  i. New class constants
  j. New hash algorithms
-13. Internals API changes

 
 1. Changes made to default configuration
@@ -259,10 +258,4 @@
- fnv164
- joaat

-
-13. Internal API changes
-

-virtual_file_ex takes now a TSRM context as last parameter:
-CWD_API int virtual_file_ex(cwd_state *state, const char *path,
- verify_path_func verify_path, int use_realpath TSRLS_DC);

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c trunk/sapi/fpm/fpm/fpm_process_ctl.c

2010-08-30 Thread Jérôme Loyet
fat  Mon, 30 Aug 2010 15:21:31 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302886

Log:
- only one process (for all pools) could be killed by the 'dynamic' process 
manager. Now it's one process per pool which can be killed by the 'dynamic' 
process manager.
- rename nonsense variable (i)

Changed paths:
U   php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
U   php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c

Modified: php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c
===
--- php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c 2010-08-30 
10:27:03 UTC (rev 302885)
+++ php/php-src/branches/PHP_5_3/sapi/fpm/fpm/fpm_process_ctl.c 2010-08-30 
15:21:31 UTC (rev 302886)
@@ -317,13 +317,13 @@
 static void fpm_pctl_perform_idle_server_maintenance(struct timeval *now, 
struct event_base *base) /* {{{ */
 {
struct fpm_worker_pool_s *wp;
-   struct fpm_child_s *last_idle_child = NULL;
-   int i;

for (wp = fpm_worker_all_pools; wp; wp = wp-next) {
struct fpm_child_s *child;
+   struct fpm_child_s *last_idle_child = NULL;
int idle = 0;
int active = 0;
+   int children_to_fork;

if (wp-config == NULL) continue;

@@ -378,11 +378,11 @@
}

/* compute the number of idle process to spawn */
-   i = MIN(wp-idle_spawn_rate, 
wp-config-pm_min_spare_servers - idle);
+   children_to_fork = MIN(wp-idle_spawn_rate, 
wp-config-pm_min_spare_servers - idle);

/* get sure it won't exceed max_children */
-   i = MIN(i, wp-config-pm_max_children - 
wp-running_children);
-   if (i = 0) {
+   children_to_fork = MIN(children_to_fork, 
wp-config-pm_max_children - wp-running_children);
+   if (children_to_fork = 0) {
if (!wp-warn_max_children) {
zlog(ZLOG_STUFF, ZLOG_WARNING, [pool 
%s] server reached max_children setting (%d), consider raising it, 
wp-config-name, wp-config-pm_max_children);
wp-warn_max_children = 1;
@@ -392,7 +392,7 @@
}
wp-warn_max_children = 0;

-   fpm_children_make(wp, 1, i, 1, base);
+   fpm_children_make(wp, 1, children_to_fork, 1, base);

/* if it's a child, stop here without creating the next 
event
 * this event is reserved to the master process
@@ -401,7 +401,7 @@
return;
}

-   zlog(ZLOG_STUFF, ZLOG_DEBUG, [pool %s] %d child(ren) 
have been created dynamically, wp-config-name, i);
+   zlog(ZLOG_STUFF, ZLOG_DEBUG, [pool %s] %d child(ren) 
have been created dynamically, wp-config-name, children_to_fork);

/* Double the spawn rate for the next iteration */
if (wp-idle_spawn_rate  FPM_MAX_SPAWN_RATE) {

Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c
===
--- php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c2010-08-30 10:27:03 UTC 
(rev 302885)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_process_ctl.c2010-08-30 15:21:31 UTC 
(rev 302886)
@@ -317,13 +317,13 @@
 static void fpm_pctl_perform_idle_server_maintenance(struct timeval *now, 
struct event_base *base) /* {{{ */
 {
struct fpm_worker_pool_s *wp;
-   struct fpm_child_s *last_idle_child = NULL;
-   int i;

for (wp = fpm_worker_all_pools; wp; wp = wp-next) {
struct fpm_child_s *child;
+   struct fpm_child_s *last_idle_child = NULL;
int idle = 0;
int active = 0;
+   int children_to_fork;

if (wp-config == NULL) continue;

@@ -378,11 +378,11 @@
}

/* compute the number of idle process to spawn */
-   i = MIN(wp-idle_spawn_rate, 
wp-config-pm_min_spare_servers - idle);
+   children_to_fork = MIN(wp-idle_spawn_rate, 
wp-config-pm_min_spare_servers - idle);

/* get sure it won't exceed max_children */
-   i = MIN(i, wp-config-pm_max_children - 
wp-running_children);
-   if (i = 0) {
+   children_to_fork = MIN(children_to_fork, 
wp-config-pm_max_children - wp-running_children);
+   if (children_to_fork = 0) {
if (!wp-warn_max_children) {
zlog(ZLOG_STUFF, ZLOG_WARNING, [pool 
%s] server 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/date/lib/timelib.c branches/PHP_5_3/ext/date/lib/timelib.h branches/PHP_5_3/ext/date/php_date.c branches/PHP_5_3/ext/date/php_da

2010-08-30 Thread Derick Rethans
derick   Mon, 30 Aug 2010 15:32:09 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302887

Log:
- Fixed bug #52668 (Iterating over a dateperiod twice is broken).

Bug: http://bugs.php.net/52668 (Assigned) Iterating over a dateperiod twice is 
broken
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/date/lib/timelib.c
U   php/php-src/branches/PHP_5_3/ext/date/lib/timelib.h
U   php/php-src/branches/PHP_5_3/ext/date/php_date.c
U   php/php-src/branches/PHP_5_3/ext/date/php_date.h
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug52668.phpt
U   php/php-src/trunk/ext/date/lib/timelib.c
U   php/php-src/trunk/ext/date/lib/timelib.h
U   php/php-src/trunk/ext/date/php_date.c
U   php/php-src/trunk/ext/date/php_date.h
A   php/php-src/trunk/ext/date/tests/bug52668.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2010-08-30 15:21:31 UTC (rev 302886)
+++ php/php-src/branches/PHP_5_3/NEWS	2010-08-30 15:32:09 UTC (rev 302887)
@@ -22,6 +22,7 @@
   (Adam)
 - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers).
   (fat)
+- Fixed bug #52668 (Iterating over a dateperiod twice is broken). (Derick)
 - Fixed bug #52654 (mysqli doesn't install headers with structures it uses).
   (Andrey)
 - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int).

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/timelib.c
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/timelib.c	2010-08-30 15:21:31 UTC (rev 302886)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/timelib.c	2010-08-30 15:32:09 UTC (rev 302887)
@@ -46,6 +46,19 @@
 	return t;
 }

+timelib_time* timelib_time_clone(timelib_time *orig)
+{
+	timelib_time *tmp = timelib_time_ctor();
+	memcpy(tmp, orig, sizeof(timelib_time));
+	if (orig-tz_abbr) {
+		tmp-tz_abbr = strdup(orig-tz_abbr);
+	}
+	if (orig-tz_info) {
+		tmp-tz_info = orig-tz_info;
+	}
+	return tmp;
+}
+
 timelib_rel_time* timelib_rel_time_clone(timelib_rel_time *rel)
 {
 	timelib_rel_time *tmp = timelib_rel_time_ctor();

Modified: php/php-src/branches/PHP_5_3/ext/date/lib/timelib.h
===
--- php/php-src/branches/PHP_5_3/ext/date/lib/timelib.h	2010-08-30 15:21:31 UTC (rev 302886)
+++ php/php-src/branches/PHP_5_3/ext/date/lib/timelib.h	2010-08-30 15:32:09 UTC (rev 302887)
@@ -109,6 +109,7 @@
 timelib_time* timelib_time_ctor(void);
 void timelib_time_set_option(timelib_time* tm, int option, void* option_value);
 void timelib_time_dtor(timelib_time* t);
+timelib_time* timelib_time_clone(timelib_time* orig);

 timelib_time_offset* timelib_time_offset_ctor(void);
 void timelib_time_offset_dtor(timelib_time_offset* t);

Modified: php/php-src/branches/PHP_5_3/ext/date/php_date.c
===
--- php/php-src/branches/PHP_5_3/ext/date/php_date.c	2010-08-30 15:21:31 UTC (rev 302886)
+++ php/php-src/branches/PHP_5_3/ext/date/php_date.c	2010-08-30 15:32:09 UTC (rev 302887)
@@ -1822,7 +1822,7 @@
 {
 	date_period_it *iterator = (date_period_it *)iter;
 	php_period_obj *object   = iterator-object;
-	timelib_time   *it_time = object-start;
+	timelib_time   *it_time = object-current;

 	/* apply modification if it's not the first iteration */
 	if (!object-include_start_date || iterator-current_index  0) {
@@ -1834,7 +1834,7 @@
 	}

 	if (object-end) {
-		return object-start-sse  object-end-sse ? SUCCESS : FAILURE;
+		return object-current-sse  object-end-sse ? SUCCESS : FAILURE;
 	} else {
 		return (iterator-current_index  object-recurrences) ? SUCCESS : FAILURE;
 	}
@@ -1847,7 +1847,7 @@
 {
 	date_period_it *iterator = (date_period_it *)iter;
 	php_period_obj *object   = iterator-object;
-	timelib_time   *it_time = object-start;
+	timelib_time   *it_time = object-current;
 	php_date_obj   *newdateobj;

 	/* Create new object */
@@ -1895,6 +1895,10 @@
 	date_period_it   *iterator = (date_period_it *)iter;

 	iterator-current_index = 0;
+	if (iterator-object-current) {
+		timelib_time_dtor(iterator-object-current);
+	}
+	iterator-object-current = timelib_time_clone(iterator-object-start);
 	date_period_it_invalidate_current(iter TSRMLS_CC);
 }
 /* }}} */
@@ -2335,6 +2339,10 @@
 		timelib_time_dtor(intern-start);
 	}

+	if (intern-current) {
+		timelib_time_dtor(intern-current);
+	}
+
 	if (intern-end) {
 		timelib_time_dtor(intern-end);
 	}
@@ -3713,6 +3721,7 @@
 	}

 	dpobj = zend_object_store_get_object(getThis() TSRMLS_CC);
+	dpobj-current = NULL;

 	if (isostr_len) {
 		date_period_initialize((dpobj-start), (dpobj-end), (dpobj-interval), (int*) recurrences, isostr, isostr_len TSRMLS_CC);
@@ -3754,14 +3763,7 @@
 		/* end date */
 		if (end) {
 			dateobj = (php_date_obj *) 

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug52454.phpt

2010-08-30 Thread Derick Rethans
derick   Mon, 30 Aug 2010 16:47:46 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302892

Log:
- Added test file that I forgot to commit.

Changed paths:
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug52454.phpt

Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug52454.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug52454.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug52454.phpt   2010-08-30 
16:47:46 UTC (rev 302892)
@@ -0,0 +1,22 @@
+--TEST--
+Bug #52454 (Relative dates and getTimestamp increments by one day)
+--FILE--
+?php
+date_default_timezone_set('Europe/London');
+
+$endOfWeek = new DateTime('2010-07-27 09:46:49');
+$endOfWeek-modify('this week +6 days');
+
+echo $endOfWeek-format('Y-m-d H:i:s').\n;
+echo $endOfWeek-format('U').\n;
+
+/* Thar she blows! */
+echo $endOfWeek-getTimestamp().\n;
+
+echo $endOfWeek-format('Y-m-d H:i:s').\n;
+?
+--EXPECT--
+2010-08-01 09:46:49
+1280652409
+1280652409
+2010-08-01 09:46:49

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/date/tests/bug52342.phpt trunk/ext/date/tests/bug52342.phpt

2010-08-30 Thread Derick Rethans
derick   Mon, 30 Aug 2010 16:48:21 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302893

Log:
- Tests for bug #52342 (DateTime setIsoDate results in wrong timestamp).

Bug: http://bugs.php.net/52342 (Assigned) DateTime setIsoDate results in wrong 
timestamp
  
Changed paths:
A   php/php-src/branches/PHP_5_3/ext/date/tests/bug52342.phpt
A   php/php-src/trunk/ext/date/tests/bug52342.phpt

Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug52342.phpt
===
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug52342.phpt   
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug52342.phpt   2010-08-30 
16:48:21 UTC (rev 302893)
@@ -0,0 +1,23 @@
+--TEST--
+Bug #52342 (DateTime setIsoDate results in wrong timestamp)
+--FILE--
+?php
+date_default_timezone_set('Europe/Berlin');
+$from = new DateTime();
+$from-setTime(0, 0, 0);
+$from-setISODate(2010, 28, 1); //Montag der 28ten Woche 2010
+
+echo $from-format('d.m.Y H:i'), \n; //A
+echo $from-getTimestamp(), \n; //B
+echo date('d.m.Y H:i', $from-getTimestamp()), \n; //C
+
+$from-add(new DateInterval('P0D'));
+echo $from-getTimestamp(), \n; //B
+echo date('d.m.Y H:i', $from-getTimestamp()), \n; //C
+?
+--EXPECT--
+12.07.2010
+1278885600
+12.07.2010 00:00
+1278885600
+12.07.2010 00:00

Added: php/php-src/trunk/ext/date/tests/bug52342.phpt
===
--- php/php-src/trunk/ext/date/tests/bug52342.phpt  
(rev 0)
+++ php/php-src/trunk/ext/date/tests/bug52342.phpt  2010-08-30 16:48:21 UTC 
(rev 302893)
@@ -0,0 +1,23 @@
+--TEST--
+Bug #52342 (DateTime setIsoDate results in wrong timestamp)
+--FILE--
+?php
+date_default_timezone_set('Europe/Berlin');
+$from = new DateTime();
+$from-setTime(0, 0, 0);
+$from-setISODate(2010, 28, 1); //Montag der 28ten Woche 2010
+
+echo $from-format('d.m.Y H:i'), \n; //A
+echo $from-getTimestamp(), \n; //B
+echo date('d.m.Y H:i', $from-getTimestamp()), \n; //C
+
+$from-add(new DateInterval('P0D'));
+echo $from-getTimestamp(), \n; //B
+echo date('d.m.Y H:i', $from-getTimestamp()), \n; //C
+?
+--EXPECT--
+12.07.2010
+1278885600
+12.07.2010 00:00
+1278885600
+12.07.2010 00:00

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

[PHP-CVS] svn: /php/php-src/trunk/ext/date/tests/ bug52290.phpt

2010-08-30 Thread Derick Rethans
derick   Mon, 30 Aug 2010 16:50:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302894

Log:
- Keep 5.3 and trunk in sync.

Changed paths:
A + php/php-src/trunk/ext/date/tests/bug52290.phpt
(from php/php-src/branches/PHP_5_3/ext/date/tests/bug52290.phpt:r302885)

Copied: php/php-src/trunk/ext/date/tests/bug52290.phpt (from rev 302885, 
php/php-src/branches/PHP_5_3/ext/date/tests/bug52290.phpt)
===
--- php/php-src/trunk/ext/date/tests/bug52290.phpt  
(rev 0)
+++ php/php-src/trunk/ext/date/tests/bug52290.phpt  2010-08-30 16:50:10 UTC 
(rev 302894)
@@ -0,0 +1,27 @@
+--TEST--
+Bug #52290 (setDate, setISODate, setTime works wrong when DateTime created 
from timestamp)
+--FILE--
+?php
+$tz = 'UTC';
+date_default_timezone_set($tz);
+
+$ts = strtotime('2006-01-01');
+$dt = new DateTime('@'.$ts);
+$dt-setTimezone(new DateTimeZone($tz));
+
+var_dump($dt-format('o-\WW-N | Y-m-d | H:i:s | U'));
+
+$dt-setISODate(2005, 52, 1);
+var_dump($dt-format('o-\WW-N | Y-m-d | H:i:s | U'));
+
+$dt-setDate(2007, 10, 10);
+var_dump($dt-format('o-\WW-N | Y-m-d | H:i:s | U'));
+
+$dt-setTime(20, 30, 40);
+var_dump($dt-format('o-\WW-N | Y-m-d | H:i:s | U'));
+?
+--EXPECTF--
+string(47) 2005-W52-7 | 2006-01-01 | 00:00:00 | 1136073600
+string(47) 2005-W52-1 | 2005-12-26 | 00:00:00 | 113200
+string(47) 2007-W40-5 | 2007-10-10 | 00:00:00 | 1191974400
+string(47) 2007-W40-5 | 2007-10-10 | 20:30:40 | 1192048240
\ No newline at end of file

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/standard/proc_open.c trunk/ext/standard/proc_open.c

2010-08-30 Thread Pierre Joye
pajoye   Mon, 30 Aug 2010 16:52:48 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302895

Log:
- WS

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
U   php/php-src/trunk/ext/standard/proc_open.c

Modified: php/php-src/branches/PHP_5_3/ext/standard/proc_open.c
===
--- php/php-src/branches/PHP_5_3/ext/standard/proc_open.c	2010-08-30 16:50:10 UTC (rev 302894)
+++ php/php-src/branches/PHP_5_3/ext/standard/proc_open.c	2010-08-30 16:52:48 UTC (rev 302895)
@@ -88,13 +88,13 @@
 	HashPosition pos;

 	memset(env, 0, sizeof(env));
-
+
 	if (!environment) {
 		return env;
 	}
-
+
 	cnt = zend_hash_num_elements(Z_ARRVAL_P(environment));
-
+
 	if (cnt  1) {
 #ifndef PHP_WIN32
 		env.envarray = (char **) pecalloc(1, sizeof(char *), is_persistent);
@@ -112,15 +112,15 @@
 	for (zend_hash_internal_pointer_reset_ex(target_hash, pos);
 			zend_hash_get_current_data_ex(target_hash, (void **) element, pos) == SUCCESS;
 			zend_hash_move_forward_ex(target_hash, pos)) {
-
+
 		convert_to_string_ex(element);
 		el_len = Z_STRLEN_PP(element);
 		if (el_len == 0) {
 			continue;
 		}
-
+
 		sizeenv += el_len+1;
-
+
 		switch (zend_hash_get_current_key_ex(target_hash, string_key, string_length, num_key, 0, pos)) {
 			case HASH_KEY_IS_STRING:
 if (string_length == 0) {
@@ -139,14 +139,14 @@
 	for (zend_hash_internal_pointer_reset_ex(target_hash, pos);
 			zend_hash_get_current_data_ex(target_hash, (void **) element, pos) == SUCCESS;
 			zend_hash_move_forward_ex(target_hash, pos)) {
-
+
 		convert_to_string_ex(element);
 		el_len = Z_STRLEN_PP(element);
-
+
 		if (el_len == 0) {
 			continue;
 		}
-
+
 		data = Z_STRVAL_PP(element);
 		switch (zend_hash_get_current_key_ex(target_hash, string_key, string_length, num_key, 0, pos)) {
 			case HASH_KEY_IS_STRING:
@@ -185,7 +185,7 @@
 memcpy(p, string_key, string_length);
 strcat(p, =);
 strcat(p, data);
-
+
 #ifndef PHP_WIN32
 *ep = p;
 ++ep;
@@ -203,10 +203,10 @@
 			case HASH_KEY_NON_EXISTANT:
 break;
 		}
-	}
+	}

 	assert(p - env.envp = sizeenv);
-
+
 	zend_hash_internal_pointer_reset_ex(target_hash, pos);

 	return env;
@@ -246,20 +246,19 @@
 			proc-pipes[i] = 0;
 		}
 	}
-
+
 #ifdef PHP_WIN32
-
 	WaitForSingleObject(proc-childHandle, INFINITE);
 	GetExitCodeProcess(proc-childHandle, wstatus);
 	FG(pclose_ret) = wstatus;
 	CloseHandle(proc-childHandle);
-
+
 #elif HAVE_SYS_WAIT_H
-
+
 	do {
 		wait_pid = waitpid(proc-child, wstatus, 0);
 	} while (wait_pid == -1  errno == EINTR);
-
+
 	if (wait_pid == -1) {
 		FG(pclose_ret) = -1;
 	} else {
@@ -267,14 +266,13 @@
 			wstatus = WEXITSTATUS(wstatus);
 		FG(pclose_ret) = wstatus;
 	}
-
+
 #else
 	FG(pclose_ret) = -1;
 #endif
 	_php_free_envp(proc-env, proc-is_persistent);
 	pefree(proc-command, proc-is_persistent);
 	pefree(proc, proc-is_persistent);
-
 }
 /* }}} */

@@ -340,13 +338,13 @@
 	zval *zproc;
 	struct php_process_handle *proc;
 	long sig_no = SIGTERM;
-
+
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, zproc, sig_no) == FAILURE) {
 		RETURN_FALSE;
 	}

 	ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, zproc, -1, process, le_proc_open);
-
+
 #ifdef PHP_WIN32
 	if (TerminateProcess(proc-childHandle, 255)) {
 		RETURN_TRUE;
@@ -369,13 +367,13 @@
 {
 	zval *zproc;
 	struct php_process_handle *proc;
-
+
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zproc) == FAILURE) {
 		RETURN_FALSE;
 	}

 	ZEND_FETCH_RESOURCE(proc, struct php_process_handle *, zproc, -1, process, le_proc_open);
-
+
 	zend_list_delete(Z_LVAL_P(zproc));
 	RETURN_LONG(FG(pclose_ret));
 }
@@ -395,7 +393,7 @@
 #endif
 	int running = 1, signaled = 0, stopped = 0;
 	int exitcode = -1, termsig = 0, stopsig = 0;
-
+
 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zproc) == FAILURE) {
 		RETURN_FALSE;
 	}
@@ -406,19 +404,19 @@

 	add_assoc_string(return_value, command, proc-command, 1);
 	add_assoc_long(return_value, pid, (long) proc-child);
-
+
 #ifdef PHP_WIN32
-
+
 	GetExitCodeProcess(proc-childHandle, wstatus);

 	running = wstatus == STILL_ACTIVE;
 	exitcode = running ? -1 : wstatus;
-
+
 #elif HAVE_SYS_WAIT_H
-
+
 	errno = 0;
 	wait_pid = waitpid(proc-child, wstatus, WNOHANG|WUNTRACED);
-
+
 	if (wait_pid == proc-child) {
 		if (WIFEXITED(wstatus)) {
 			running = 0;
@@ -461,7 +459,7 @@
 static inline HANDLE dup_handle(HANDLE src, BOOL inherit, BOOL closeorig)
 {
 	HANDLE copy, self = GetCurrentProcess();
-
+
 	if (!DuplicateHandle(self, src, self, copy, 0, inherit, DUPLICATE_SAME_ACCESS |
 (closeorig ? DUPLICATE_CLOSE_SOURCE : 0)))
 		return NULL;
@@ -553,16 +551,16 @@
 			Z_LVAL_PP(item)) {
 suppress_errors = 1;
 			}
-		}
+		}
 		if (SUCCESS == zend_hash_find(Z_ARRVAL_P(other_options), bypass_shell, sizeof(bypass_shell), (void**)item)) {
 			if ((Z_TYPE_PP(item) == IS_BOOL || Z_TYPE_PP(item) == IS_LONG) 
 			Z_LVAL_PP(item)) {
 			

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqli/mysqli.c branches/PHP_5_3/ext/mysqli/mysqli_api.c branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt trunk/ext/mysqli/mysqli.c trunk/ext/m

2010-08-30 Thread Ulf Wendel
uw   Mon, 30 Aug 2010 16:59:10 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302897

Log:
Adding MYSQLI_OPT_SSL_VERIFY_SERVER_CERT for use with mysqli_options().

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
U   php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt
U   php/php-src/trunk/ext/mysqli/mysqli.c
U   php/php-src/trunk/ext/mysqli/mysqli_api.c
U   php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2010-08-30 16:57:06 UTC 
(rev 302896)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli.c2010-08-30 16:59:10 UTC 
(rev 302897)
@@ -668,6 +668,9 @@
 #ifdef MYSQLND_STRING_TO_INT_CONVERSION
REGISTER_LONG_CONSTANT(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 
MYSQLND_OPT_INT_AND_FLOAT_NATIVE, CONST_CS | CONST_PERSISTENT);
 #endif
+#if MYSQL_VERSION_ID  50110 || defined(MYSQLI_USE_MYSQLND)
+   REGISTER_LONG_CONSTANT(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, 
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#endif

/* mysqli_real_connect flags */
REGISTER_LONG_CONSTANT(MYSQLI_CLIENT_SSL, CLIENT_SSL, CONST_CS | 
CONST_PERSISTENT);

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-08-30 
16:57:06 UTC (rev 302896)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_api.c2010-08-30 
16:59:10 UTC (rev 302897)
@@ -1652,6 +1652,9 @@
 #ifdef MYSQL_OPT_COMPRESS
case MYSQL_OPT_COMPRESS:
 #endif /* mysqlnd @ PHP 5.3.2 */
+#ifdef MYSQL_OPT_SSL_VERIFY_SERVER_CERT
+   REGISTER_LONG_CONSTANT(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, 
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#endif /* MySQL 5.1.1., mysqlnd @ PHP 5.3.3 */
return IS_LONG;

 #ifdef MYSQL_SHARED_MEMORY_BASE_NAME

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt
===
--- php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt 
2010-08-30 16:57:06 UTC (rev 302896)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/tests/mysqli_constants.phpt 
2010-08-30 16:59:10 UTC (rev 302897)
@@ -150,6 +150,10 @@
));
}

+   if ($version  50110 || $IS_MYSQLND) {
+   $expected_constants['MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'] = true;
+   }
+
/* pretty dump test, but that is the best way to mimic mysql.c */
if (defined('MYSQLI_DATA_TRUNCATED'))
$expected_constants[MYSQLI_DATA_TRUNCATED] = true;

Modified: php/php-src/trunk/ext/mysqli/mysqli.c
===
--- php/php-src/trunk/ext/mysqli/mysqli.c   2010-08-30 16:57:06 UTC (rev 
302896)
+++ php/php-src/trunk/ext/mysqli/mysqli.c   2010-08-30 16:59:10 UTC (rev 
302897)
@@ -670,6 +670,9 @@
 #ifdef MYSQLND_STRING_TO_INT_CONVERSION
REGISTER_LONG_CONSTANT(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 
MYSQLND_OPT_INT_AND_FLOAT_NATIVE, CONST_CS | CONST_PERSISTENT);
 #endif
+#if MYSQL_VERSION_ID  50110 || defined(MYSQLI_USE_MYSQLND)
+   REGISTER_LONG_CONSTANT(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, 
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#endif

/* mysqli_real_connect flags */
REGISTER_LONG_CONSTANT(MYSQLI_CLIENT_SSL, CLIENT_SSL, CONST_CS | 
CONST_PERSISTENT);

Modified: php/php-src/trunk/ext/mysqli/mysqli_api.c
===
--- php/php-src/trunk/ext/mysqli/mysqli_api.c   2010-08-30 16:57:06 UTC (rev 
302896)
+++ php/php-src/trunk/ext/mysqli/mysqli_api.c   2010-08-30 16:59:10 UTC (rev 
302897)
@@ -1652,6 +1652,9 @@
 #ifdef MYSQL_OPT_COMPRESS
case MYSQL_OPT_COMPRESS:
 #endif /* mysqlnd @ PHP 5.3.2 */
+#ifdef MYSQL_OPT_SSL_VERIFY_SERVER_CERT
+   REGISTER_LONG_CONSTANT(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, 
MYSQL_OPT_SSL_VERIFY_SERVER_CERT, CONST_CS | CONST_PERSISTENT);
+#endif /* MySQL 5.1.1., mysqlnd @ PHP 5.3.3 */
return IS_LONG;

 #ifdef MYSQL_SHARED_MEMORY_BASE_NAME

Modified: php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt
===
--- php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt2010-08-30 
16:57:06 UTC (rev 302896)
+++ php/php-src/trunk/ext/mysqli/tests/mysqli_constants.phpt2010-08-30 
16:59:10 UTC (rev 302897)
@@ -150,6 +150,10 @@
));
}

+   if ($version  50110 || $IS_MYSQLND) {
+   $expected_constants['MYSQLI_OPT_SSL_VERIFY_SERVER_CERT'] = true;
+

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/php_ini.c trunk/main/php_ini.c

2010-08-30 Thread Pierre Joye
pajoye   Mon, 30 Aug 2010 17:05:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302899

Log:
- fix possible leak and error while fetching PHPRC

Changed paths:
U   php/php-src/branches/PHP_5_3/main/php_ini.c
U   php/php-src/trunk/main/php_ini.c

Modified: php/php-src/branches/PHP_5_3/main/php_ini.c
===
--- php/php-src/branches/PHP_5_3/main/php_ini.c 2010-08-30 17:01:36 UTC (rev 
302898)
+++ php/php-src/branches/PHP_5_3/main/php_ini.c 2010-08-30 17:05:56 UTC (rev 
302899)
@@ -398,13 +398,35 @@
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 
};
 #ifdef PHP_WIN32
char *reg_location;
+   char phprc_path[MAXPATHLEN];
 #endif

env_location = getenv(PHPRC);
+
+#ifdef PHP_WIN32
if (!env_location) {
-   env_location = ;
+   char dummybuf;
+   int size;
+
+   SetLastError(0);
+
+   /*If the given bugger is not large enough to hold the 
data, the return value is
+   the buffer size,  in characters, required to hold the 
string and its terminating
+   null character. We use this return value to alloc the 
final buffer. */
+   size = GetEnvironmentVariableA(PHPRC, dummybuf, 0);
+   if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+   /* The environment variable doesn't exist. */
+   env_location = ;
+   } else {
+   if (size == 0) {
+   env_location = ;
+   } else {
+   size = GetEnvironmentVariableA(PHPRC, 
phprc_path, size);
+   env_location = phprc_path;
+   }
+   }
}
-
+#endif
/*
 * Prepare search path
 */

Modified: php/php-src/trunk/main/php_ini.c
===
--- php/php-src/trunk/main/php_ini.c2010-08-30 17:01:36 UTC (rev 302898)
+++ php/php-src/trunk/main/php_ini.c2010-08-30 17:05:56 UTC (rev 302899)
@@ -396,13 +396,35 @@
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 
};
 #ifdef PHP_WIN32
char *reg_location;
+   char phprc_path[MAXPATHLEN];
 #endif

env_location = getenv(PHPRC);
+
+#ifdef PHP_WIN32
if (!env_location) {
-   env_location = ;
+   char dummybuf;
+   int size;
+
+   SetLastError(0);
+
+   /*If the given bugger is not large enough to hold the 
data, the return value is
+   the buffer size,  in characters, required to hold the 
string and its terminating
+   null character. We use this return value to alloc the 
final buffer. */
+   size = GetEnvironmentVariableA(PHPRC, dummybuf, 0);
+   if (GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+   /* The environment variable doesn't exist. */
+   env_location = ;
+   } else {
+   if (size == 0) {
+   env_location = ;
+   } else {
+   size = GetEnvironmentVariableA(PHPRC, 
phprc_path, size);
+   env_location = phprc_path;
+   }
+   }
}
-
+#endif
/*
 * Prepare search path
 */

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c trunk/ext/mysqlnd/mysqlnd_ps_codec.c

2010-08-30 Thread Andrey Hristov
andrey   Mon, 30 Aug 2010 18:10:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302901

Log:
Fix for MySQL Bug #49406
Binding params doesn't work when selecting a date inside a CASE-WHEN
(http://bugs.mysql.com/bug.php?id=49406)
The MySQL server sends MYSQL_TYPE_NEWDATE values as clear text, even
when PS are used and thus the binary protocol are used. Changing the
handler for the type.

Bug: http://bugs.php.net/49406 (Bogus) utf8_decode(): Include caution note 
that it destroys 99.9% of all characters
  
Changed paths:
U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
U   php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c
===
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 
17:08:34 UTC (rev 302900)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps_codec.c 2010-08-30 
18:10:23 UTC (rev 302901)
@@ -493,7 +493,7 @@
mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].php_type= IS_STRING;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni   
= TRUE;

-   mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = 
ps_fetch_date;
+   mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = 
ps_fetch_string;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = 
MYSQLND_PS_SKIP_RESULT_W_LEN;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type = IS_STRING;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni
= TRUE;

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c
===
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c2010-08-30 17:08:34 UTC 
(rev 302900)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps_codec.c2010-08-30 18:10:23 UTC 
(rev 302901)
@@ -493,7 +493,7 @@
mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].php_type= IS_STRING;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni   
= TRUE;

-   mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = 
ps_fetch_date;
+   mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = 
ps_fetch_string;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = 
MYSQLND_PS_SKIP_RESULT_W_LEN;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type = IS_STRING;
mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni
= TRUE;

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

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2010-08-30 Thread Andrey Hristov
andrey   Mon, 30 Aug 2010 18:13:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302902

Log:
here comes the news

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-08-30 18:10:23 UTC (rev 302901)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-08-30 18:13:28 UTC (rev 302902)
@@ -16,6 +16,8 @@
 - Changed the $context parameter on copy() to actually have an effect. (Kalle)
 - Fixed possible crash in mssql_fetch_batch(). (Kalle)

+- Fixed bug #52745 (Binding params doesn't work when selecting a date inside a
+  CASE-WHEN). (Andrey)
 - Fixed bug #52699 (PDO bindValue writes long int 32bit enum).
   (rein at basefarm dot no)
 - Fixed bug #52681 (mb_send_mail() appends an extra MIME-Version header).

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

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/php_ini.c trunk/main/php_ini.c

2010-08-30 Thread Felipe Pena
felipe   Mon, 30 Aug 2010 21:34:54 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=302903

Log:
- Fixed crash on non-Windows build

Changed paths:
U   php/php-src/branches/PHP_5_3/main/php_ini.c
U   php/php-src/trunk/main/php_ini.c

Modified: php/php-src/branches/PHP_5_3/main/php_ini.c
===
--- php/php-src/branches/PHP_5_3/main/php_ini.c 2010-08-30 18:13:28 UTC (rev 
302902)
+++ php/php-src/branches/PHP_5_3/main/php_ini.c 2010-08-30 21:34:54 UTC (rev 
302903)
@@ -426,6 +426,10 @@
}
}
}
+#else
+   if (!env_location) {
+   env_location = ;
+   }
 #endif
/*
 * Prepare search path

Modified: php/php-src/trunk/main/php_ini.c
===
--- php/php-src/trunk/main/php_ini.c2010-08-30 18:13:28 UTC (rev 302902)
+++ php/php-src/trunk/main/php_ini.c2010-08-30 21:34:54 UTC (rev 302903)
@@ -424,6 +424,10 @@
}
}
}
+#else
+   if (!env_location) {
+   env_location = ;
+   }
 #endif
/*
 * Prepare search path

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