Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/soap soap.c /ext/soap/tests/bugs bug31755.phpt

2008-09-09 Thread Jani Taskinen

Felipe Pena wrote:

felipe  Mon Sep  8 19:41:42 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/soap	soap.c 
/php-src/ext/soap/tests/bugs	bug31755.phpt 
  Log:

  - MFH: Changed error level E_ERROR into E_WARNING in parameter validation


Okay, so now there are no E_ERROR errors in ext/soap? (not time to check 
 now :) If so, can you chagne that NEWS entry you added to something 
more understandable..?


--Jani


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



[PHP-CVS] cvs: CVSROOT / avail

2008-09-09 Thread Pierre-Alain Joye
pajoye  Tue Sep  9 09:20:26 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - ambrish karma for IBM's module
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1447&r2=1.1448&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1447 CVSROOT/avail:1.1448
--- CVSROOT/avail:1.1447Mon Sep  8 07:38:35 2008
+++ CVSROOT/avail   Tue Sep  9 09:20:26 2008
@@ -313,10 +313,10 @@
 # please contact the lead developers.  This is a temporary measure until
 # we can put in place a more general process.
 
unavail||pecl/ibm_db2,pecl/sdo,pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm,pecl/sam
-avail|dbs,skoduru,kraman,rs,kfbombar,tessus|pecl/ibm_db2,pecl/pdo_ibm
+avail|dbs,skoduru,kraman,rs,kfbombar,tessus,ambrish|pecl/ibm_db2,pecl/pdo_ibm
 avail|wez,dbs|pecl/pdo_odbc,php-src/ext/pdo_odbc
 avail|gcc,cem,mfp,ansriniv,slaws,chm,rs|pecl/sdo
-avail|dbs,kraman,kfbombar|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm
+avail|dbs,kraman,kfbombar,ambrish|pecl/pdo_ids,pecl/pdo_informix,pecl/pdo_ibm
 avail|dsr|pecl/sam,phpdoc
 
 # PDO Specs. CLA required to commit



-- 
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) / NEWS

2008-09-09 Thread Felipe Pena
felipe  Tue Sep  9 13:26:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - New try
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.311&r2=1.2027.2.547.2.965.2.312&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.311 
php-src/NEWS:1.2027.2.547.2.965.2.312
--- php-src/NEWS:1.2027.2.547.2.965.2.311   Tue Sep  9 07:55:07 2008
+++ php-src/NEWSTue Sep  9 13:26:40 2008
@@ -2,7 +2,8 @@
 |||
 ?? ??? 200?, PHP 5.3.0 Alpha 3
 - Upgraded bundled PCRE to version 7.8. (Nuno)
-- Changed Soap methods error level, now it is no longer E_ERROR. (Felipe)
+- Changed error level E_ERROR into E_WARNING in Soap extension methods 
+  parameter validation. (Felipe)
 
 - Fixed bug #45911 (Cannot disable ext/hash). (Arnaud)
 



-- 
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/soap soap.c /ext/soap/tests/bugs bug31755.phpt

2008-09-09 Thread Felipe Pena
Em Ter, 2008-09-09 às 10:11 +0300, Jani Taskinen escreveu:
> Felipe Pena wrote:
> > felipe  Mon Sep  8 19:41:42 2008 UTC
> > 
> >   Modified files:  (Branch: PHP_5_3)
> > /php-src/ext/soap   soap.c 
> > /php-src/ext/soap/tests/bugsbug31755.phpt 
> >   Log:
> >   - MFH: Changed error level E_ERROR into E_WARNING in parameter validation
> 
> Okay, so now there are no E_ERROR errors in ext/soap? (not time to check 
>   now :) If so, can you chagne that NEWS entry you added to something 
> more understandable..?

There are E_ERROR yet, I just removed them from the parameter validation.


-- 
Regards,
Felipe Pena.


-- 
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/odbc php_odbc.c php_odbc_includes.h

2008-09-09 Thread Hannes Magnusson
On Fri, Aug 29, 2008 at 21:16, Patrick van Kleef <[EMAIL PROTECTED]> wrote:
> iodbc   Fri Aug 29 19:16:58 2008 UTC
>
>  Modified files:  (Branch: PHP_5_3)
>/php-src/ext/odbc   php_odbc.c php_odbc_includes.h
>  Log:
>  - MFH: Added odbc.default_cursortype to control the ODBC cursormodel
>(bug #43668)

It would greatly simplify things for those of us without odbc setup if
you could mention which constant is the default value =)

-Hannes

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



[PHP-CVS] Re: [PHP-DOC] cvs: php-src /ext/standard/tests/network inet.phpt

2008-09-09 Thread Hannes Magnusson
2008/8/22 Pierre-Alain Joye <[EMAIL PROTECTED]>:
> pajoye  Thu Aug 21 23:28:21 2008 UTC
>
>  Modified files:
>/php-src/ext/standard/tests/network inet.phpt
>  Log:
>  - [DOC] fix test, chr uses codepoint as input

I assume that is as of PHP6? :]

-Hannes

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



Re: [PHP-CVS] Re: [PHP-DOC] cvs: php-src /ext/standard/tests/network inet.phpt

2008-09-09 Thread Pierre Joye
On Tue, Sep 9, 2008 at 4:36 PM, Hannes Magnusson
<[EMAIL PROTECTED]> wrote:
> 2008/8/22 Pierre-Alain Joye <[EMAIL PROTECTED]>:
>> pajoye  Thu Aug 21 23:28:21 2008 UTC
>>
>>  Modified files:
>>/php-src/ext/standard/tests/network inet.phpt
>>  Log:
>>  - [DOC] fix test, chr uses codepoint as input
>
> I assume that is as of PHP6? :]

Yes :)


-- 
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 /ext/spl spl_iterators.c /ext/spl/tests bug46031.phpt

2008-09-09 Thread Arnaud Le Blanc
lbarnaudTue Sep  9 19:43:52 2008 UTC

  Added files: 
/php-src/ext/spl/tests  bug46031.phpt 

  Modified files:  
/php-src/ext/splspl_iterators.c 
  Log:
  Fixed bug #46031 (Segfault in AppendIterator::next)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.177&r2=1.178&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.177 
php-src/ext/spl/spl_iterators.c:1.178
--- php-src/ext/spl/spl_iterators.c:1.177   Fri Aug  8 22:06:42 2008
+++ php-src/ext/spl/spl_iterators.c Tue Sep  9 19:43:52 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.177 2008/08/08 22:06:42 colder Exp $ */
+/* $Id: spl_iterators.c,v 1.178 2008/09/09 19:43:52 lbarnaud Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1499,6 +1499,9 @@
 
 static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC)
 {
+   if (!intern->inner.iterator) {
+   return FAILURE;
+   }
/* FAILURE / SUCCESS */
return intern->inner.iterator->funcs->valid(intern->inner.iterator 
TSRMLS_CC);
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46031.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/bug46031.phpt
+++ php-src/ext/spl/tests/bug46031.phpt
--TEST--
Bug #46031 (Segfault in AppendIterator::next)
--FILE--
next());
?>
--EXPECT--
NULL



-- 
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/spl spl_iterators.c /ext/spl/tests bug46031.phpt

2008-09-09 Thread Arnaud Le Blanc
lbarnaudTue Sep  9 19:44:15 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/spl/tests  bug46031.phpt 

  Modified files:  
/php-src/ext/splspl_iterators.c 
  Log:
  MFH: Fixed bug #46031 (Segfault in AppendIterator::next)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.28.2.13&r2=1.73.2.30.2.28.2.14&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.13 
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.14
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28.2.13 Fri Aug  8 22:07:07 2008
+++ php-src/ext/spl/spl_iterators.c Tue Sep  9 19:44:15 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.13 2008/08/08 22:07:07 colder Exp $ 
*/
+/* $Id: spl_iterators.c,v 1.73.2.30.2.28.2.14 2008/09/09 19:44:15 lbarnaud Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1445,6 +1445,9 @@
 
 static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC)
 {
+   if (!intern->inner.iterator) {
+   return FAILURE;
+   }
/* FAILURE / SUCCESS */
return intern->inner.iterator->funcs->valid(intern->inner.iterator 
TSRMLS_CC);
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46031.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/bug46031.phpt
+++ php-src/ext/spl/tests/bug46031.phpt
--TEST--
Bug #46031 (Segfault in AppendIterator::next)
--FILE--
next());
?>
--EXPECT--
NULL



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/spl spl_iterators.c /ext/spl/tests bug46031.phpt

2008-09-09 Thread Arnaud Le Blanc
lbarnaudTue Sep  9 19:44:25 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/spl/tests  bug46031.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/splspl_iterators.c 
  Log:
  MFH: Fixed bug #46031 (Segfault in AppendIterator::next)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1216&r2=1.2027.2.547.2.1217&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1216 php-src/NEWS:1.2027.2.547.2.1217
--- php-src/NEWS:1.2027.2.547.2.1216Sun Sep  7 23:10:07 2008
+++ php-src/NEWSTue Sep  9 19:44:24 2008
@@ -19,6 +19,7 @@
 - Fixed a crash on invalid method in ReflectionParameter constructor.
   (Christian Seiler)
 
+- Fixed bug #46031 (Segfault in AppendIterator::next). (Arnaud)
 - Fixed bug #46010 (warnings incorrectly generated for iv in ecb mode). 
   (Felipe)
 - Fixed bug #45405 (snmp extension memory leak). (Federico Cuello, Rodrigo
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.31&r2=1.73.2.30.2.32&diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.31 
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.32
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.31  Wed Mar 12 13:24:24 2008
+++ php-src/ext/spl/spl_iterators.c Tue Sep  9 19:44:25 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.30.2.31 2008/03/12 13:24:24 colder Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.32 2008/09/09 19:44:25 lbarnaud Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -1118,6 +1118,9 @@
 
 static inline int spl_dual_it_valid(spl_dual_it_object *intern TSRMLS_DC)
 {
+   if (!intern->inner.iterator) {
+   return FAILURE;
+   }
/* FAILURE / SUCCESS */
return intern->inner.iterator->funcs->valid(intern->inner.iterator 
TSRMLS_CC);
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug46031.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/bug46031.phpt
+++ php-src/ext/spl/tests/bug46031.phpt
--TEST--
Bug #46031 (Segfault in AppendIterator::next)
--FILE--
next());
?>
--EXPECT--
NULL



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



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

2008-09-09 Thread Felipe Pena
felipe  Wed Sep 10 00:05:27 2008 UTC

  Modified files:  
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
  Log:
  - Merged fix from SF project (Import Jeff Lawsons patches for XML datetime 
bug fixes)
Fixed bugs:
#45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
#18916 (xmlrpc_set_type() "not working")
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.12&r2=1.13&diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.12 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.13
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.12  Tue Sep 18 19:52:27 2007
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Wed Sep 10 00:05:26 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.12 2007/09/18 19:52:27 
iliaa Exp $";
+static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.13 2008/09/10 00:05:26 
felipe Exp $";
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,12 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.13  2008/09/10 00:05:26  felipe
+ *   - Merged fix from SF project (Import Jeff Lawsons patches for XML 
datetime bug fixes)
+ * Fixed bugs:
+ * #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
+ * #18916 (xmlrpc_set_type() "not working")
+ *
  *   Revision 1.12  2007/09/18 19:52:27  iliaa
  *
  *   MFB: Fixed bug #42189 (xmlrpc_set_type() crashes php on invalid datetime
@@ -169,11 +175,21 @@
 * Begin Time Functions *
 ***/
 
+static time_t mkgmtime(struct tm *tm)
+{
+static const int mdays[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
+
+return ((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 +
+  (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 
60 +
+tm->tm_min) * 60 + tm->tm_sec;
+}
+
 static int date_from_ISO8601 (const char *text, time_t * value) {
struct tm tm;
int n;
int i;
-   char buf[18];
+   char buf[30];
+   
 
if (strchr (text, '-')) {
char *p = (char *) text, *p2 = buf;
@@ -181,6 +197,9 @@
if (*p != '-') {
*p2 = *p;
p2++;
+   if (p2-buf >= sizeof(buf)) {
+   return -1;
+   }
}
p++;
}
@@ -190,10 +209,6 @@
 
tm.tm_isdst = -1;
 
-   if(strlen(text) < 17) {
-  return -1;
-   }
-
 #define XMLRPC_IS_NUMBER(x) if (x < '0' || x > '9') return -1;
 
n = 1000;
@@ -246,7 +261,7 @@
 
tm.tm_year -= 1900;
 
-   *value = mktime(&tm);
+   *value = mkgmtime(&tm);
 
return 0;
 
@@ -254,14 +269,14 @@
 
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
-   tm = php_localtime_r(&value, &tmbuf);
+   tm = php_gmtime_r(&value, &tmbuf);
if (!tm) {
   return 0;
}
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm);
 #else
-   return strftime(buf, length, "%Y%m%dT%H:%M:%S", tm);
+   return strftime(buf, length, "%Y%m%dT%H:%M:%SZ", tm);
 #endif
 }
 
@@ -1532,8 +1547,7 @@
   date_to_ISO8601(time, timeBuf, sizeof(timeBuf));
 
   if(timeBuf[0]) {
- simplestring_clear(&value->str);
- simplestring_add(&value->str, timeBuf);
+ XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf);
   }
}
 }
@@ -1709,8 +1723,11 @@
if(value) {
   time_t time_val = 0;
   if(s) {
+ value->type = xmlrpc_datetime;
  date_from_ISO8601(s, &time_val);
- XMLRPC_SetValueDateTime(value, time_val);
+ value->i = time_val;
+ simplestring_clear(&value->str);
+ simplestring_add(&value->str, s);
   }
}
 }



-- 
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/xmlrpc/libxmlrpc xmlrpc.c /ext/xmlrpc/tests bug18916.phpt bug45226.phpt

2008-09-09 Thread Felipe Pena
felipe  Wed Sep 10 00:07:45 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/xmlrpc/tests   bug18916.phpt bug45226.phpt 

  Modified files:  
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
  Log:
  MFH:
  - Merged fix from SF project (Import Jeff Lawsons patches for XML datetime 
bug fixes)
Fixed bugs:
#45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
#18916 (xmlrpc_set_type() "not working")
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.8.4.3&r2=1.8.4.3.2.1&diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.3 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.3.2.1
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.3   Tue Sep 18 19:49:53 2007
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Wed Sep 10 00:07:44 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.8.4.3 2007/09/18 19:49:53 
iliaa Exp $";
+static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.8.4.3.2.1 2008/09/10 
00:07:44 felipe Exp $";
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,13 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.8.4.3.2.1  2008/09/10 00:07:44  felipe
+ *   MFH:
+ *   - Merged fix from SF project (Import Jeff Lawsons patches for XML 
datetime bug fixes)
+ * Fixed bugs:
+ * #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
+ * #18916 (xmlrpc_set_type() "not working")
+ *
  *   Revision 1.8.4.3  2007/09/18 19:49:53  iliaa
  *
  *   Fixed bug #42189 (xmlrpc_set_type() crashes php on invalid datetime
@@ -166,11 +173,21 @@
 * Begin Time Functions *
 ***/
 
+static time_t mkgmtime(struct tm *tm)
+{
+static const int mdays[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
+
+return ((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 +
+  (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 
60 +
+tm->tm_min) * 60 + tm->tm_sec;
+}
+
 static int date_from_ISO8601 (const char *text, time_t * value) {
struct tm tm;
int n;
int i;
-   char buf[18];
+   char buf[30];
+   
 
if (strchr (text, '-')) {
char *p = (char *) text, *p2 = buf;
@@ -178,6 +195,9 @@
if (*p != '-') {
*p2 = *p;
p2++;
+   if (p2-buf >= sizeof(buf)) {
+   return -1;
+   }
}
p++;
}
@@ -187,10 +207,6 @@
 
tm.tm_isdst = -1;
 
-   if(strlen(text) < 17) {
-  return -1;
-   }
-
 #define XMLRPC_IS_NUMBER(x) if (x < '0' || x > '9') return -1;
 
n = 1000;
@@ -243,7 +259,7 @@
 
tm.tm_year -= 1900;
 
-   *value = mktime(&tm);
+   *value = mkgmtime(&tm);
 
return 0;
 
@@ -251,14 +267,14 @@
 
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
-   tm = php_localtime_r(&value, &tmbuf);
+   tm = php_gmtime_r(&value, &tmbuf);
if (!tm) {
   return 0;
}
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm);
 #else
-   return strftime(buf, length, "%Y%m%dT%H:%M:%S", tm);
+   return strftime(buf, length, "%Y%m%dT%H:%M:%SZ", tm);
 #endif
 }
 
@@ -1529,8 +1545,7 @@
   date_to_ISO8601(time, timeBuf, sizeof(timeBuf));
 
   if(timeBuf[0]) {
- simplestring_clear(&value->str);
- simplestring_add(&value->str, timeBuf);
+ XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf);
   }
}
 }
@@ -1706,8 +1721,11 @@
if(value) {
   time_t time_val = 0;
   if(s) {
+ value->type = xmlrpc_datetime;
  date_from_ISO8601(s, &time_val);
- XMLRPC_SetValueDateTime(value, time_val);
+ value->i = time_val;
+ simplestring_clear(&value->str);
+ simplestring_add(&value->str, s);
   }
}
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug18916.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlrpc/tests/bug18916.phpt
+++ php-src/ext/xmlrpc/tests/bug18916.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug45226.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlrpc/tests/bug45226.phpt
+++ php-src/ext/xmlrpc/tests/bug45226.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlrpc/libxmlrpc xmlrpc.c /ext/xmlrpc/tests bug18916.phpt bug45226.phpt

2008-09-09 Thread Felipe Pena
felipe  Wed Sep 10 00:09:04 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/xmlrpc/tests   bug18916.phpt bug45226.phpt 

  Modified files:  
/php-src/ext/xmlrpc/libxmlrpc   xmlrpc.c 
  Log:
  MFH:
  - Merged fix from SF project (Import Jeff Lawsons patches for XML datetime 
bug fixes)
Fixed bugs:
#45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
#18916 (xmlrpc_set_type() "not working")
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c?r1=1.8.4.3&r2=1.8.4.4&diff_format=u
Index: php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c
diff -u php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.3 
php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.4
--- php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c:1.8.4.3   Tue Sep 18 19:49:53 2007
+++ php-src/ext/xmlrpc/libxmlrpc/xmlrpc.c   Wed Sep 10 00:09:04 2008
@@ -31,7 +31,7 @@
 */
 
 
-static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.8.4.3 2007/09/18 19:49:53 
iliaa Exp $";
+static const char rcsid[] = "#(@) $Id: xmlrpc.c,v 1.8.4.4 2008/09/10 00:09:04 
felipe Exp $";
 
 
 /h* ABOUT/xmlrpc
@@ -43,6 +43,13 @@
  *   9/1999 - 10/2000
  * HISTORY
  *   $Log: xmlrpc.c,v $
+ *   Revision 1.8.4.4  2008/09/10 00:09:04  felipe
+ *   MFH:
+ *   - Merged fix from SF project (Import Jeff Lawsons patches for XML 
datetime bug fixes)
+ * Fixed bugs:
+ * #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
+ * #18916 (xmlrpc_set_type() "not working")
+ *
  *   Revision 1.8.4.3  2007/09/18 19:49:53  iliaa
  *
  *   Fixed bug #42189 (xmlrpc_set_type() crashes php on invalid datetime
@@ -166,11 +173,21 @@
 * Begin Time Functions *
 ***/
 
+static time_t mkgmtime(struct tm *tm)
+{
+static const int mdays[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
+
+return ((tm->tm_year - 70) * 365) + mdays[tm->tm_mon] + tm->tm_mday-1 +
+  (tm->tm_year-68-1+(tm->tm_mon>=2))/4) * 24) + tm->tm_hour) * 
60 +
+tm->tm_min) * 60 + tm->tm_sec;
+}
+
 static int date_from_ISO8601 (const char *text, time_t * value) {
struct tm tm;
int n;
int i;
-   char buf[18];
+   char buf[30];
+   
 
if (strchr (text, '-')) {
char *p = (char *) text, *p2 = buf;
@@ -178,6 +195,9 @@
if (*p != '-') {
*p2 = *p;
p2++;
+   if (p2-buf >= sizeof(buf)) {
+   return -1;
+   }
}
p++;
}
@@ -187,10 +207,6 @@
 
tm.tm_isdst = -1;
 
-   if(strlen(text) < 17) {
-  return -1;
-   }
-
 #define XMLRPC_IS_NUMBER(x) if (x < '0' || x > '9') return -1;
 
n = 1000;
@@ -243,7 +259,7 @@
 
tm.tm_year -= 1900;
 
-   *value = mktime(&tm);
+   *value = mkgmtime(&tm);
 
return 0;
 
@@ -251,14 +267,14 @@
 
 static int date_to_ISO8601 (time_t value, char *buf, int length) {
struct tm *tm, tmbuf;
-   tm = php_localtime_r(&value, &tmbuf);
+   tm = php_gmtime_r(&value, &tmbuf);
if (!tm) {
   return 0;
}
 #if 0  /* TODO: soap seems to favor this method. xmlrpc the latter. */
return strftime (buf, length, "%Y-%m-%dT%H:%M:%SZ", tm);
 #else
-   return strftime(buf, length, "%Y%m%dT%H:%M:%S", tm);
+   return strftime(buf, length, "%Y%m%dT%H:%M:%SZ", tm);
 #endif
 }
 
@@ -1529,8 +1545,7 @@
   date_to_ISO8601(time, timeBuf, sizeof(timeBuf));
 
   if(timeBuf[0]) {
- simplestring_clear(&value->str);
- simplestring_add(&value->str, timeBuf);
+ XMLRPC_SetValueDateTime_ISO8601 (value, timeBuf);
   }
}
 }
@@ -1706,8 +1721,11 @@
if(value) {
   time_t time_val = 0;
   if(s) {
+ value->type = xmlrpc_datetime;
  date_from_ISO8601(s, &time_val);
- XMLRPC_SetValueDateTime(value, time_val);
+ value->i = time_val;
+ simplestring_clear(&value->str);
+ simplestring_add(&value->str, s);
   }
}
 }

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug18916.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlrpc/tests/bug18916.phpt
+++ php-src/ext/xmlrpc/tests/bug18916.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug45226.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlrpc/tests/bug45226.phpt
+++ php-src/ext/xmlrpc/tests/bug45226.phpt



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



[PHP-CVS] cvs: php-src /ext/xmlrpc/tests bug18916.phpt bug45226.phpt

2008-09-09 Thread Felipe Pena
felipe  Wed Sep 10 00:09:31 2008 UTC

  Modified files:  
/php-src/ext/xmlrpc/tests   bug18916.phpt bug45226.phpt 
  Log:
  - New tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug18916.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlrpc/tests/bug18916.phpt
diff -u /dev/null php-src/ext/xmlrpc/tests/bug18916.phpt:1.2
--- /dev/null   Wed Sep 10 00:09:31 2008
+++ php-src/ext/xmlrpc/tests/bug18916.phpt  Wed Sep 10 00:09:30 2008
@@ -0,0 +1,21 @@
+--TEST--
+Bug #18916 (xmlrpc_set_type() not working)
+--INI--
+date.timezone="America/Sao_Paulo"
+--FILE--
+
+--EXPECTF--
+
+
+
+ 
+  %dT%d:%d:%d
+ 
+
+
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/bug45226.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/xmlrpc/tests/bug45226.phpt
diff -u /dev/null php-src/ext/xmlrpc/tests/bug45226.phpt:1.2
--- /dev/null   Wed Sep 10 00:09:31 2008
+++ php-src/ext/xmlrpc/tests/bug45226.phpt  Wed Sep 10 00:09:30 2008
@@ -0,0 +1,53 @@
+--TEST--
+Bug #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string)
+--INI--
+date.timezone="America/Sao_Paulo"
+--FILE--
+ $d));
+
+$d = '2008-01-01 20:00:00';
+xmlrpc_set_type($d, 'datetime');
+echo xmlrpc_encode_request('method.call', array('date' => $d));
+
+?>
+--EXPECTF--
+
+
+method.call
+
+ 
+  
+   
+
+ date
+ 
+  %d-%d-%dT%d:%d:%d%s%d
+ 
+
+   
+  
+ 
+
+
+
+
+method.call
+
+ 
+  
+   
+
+ date
+ 
+  %d-%d-%d %d:%d:%d
+ 
+
+   
+  
+ 
+
+



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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-09-09 Thread Felipe Pena
felipe  Wed Sep 10 00:20:50 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN #45226, #18916
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1217&r2=1.2027.2.547.2.1218&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1217 php-src/NEWS:1.2027.2.547.2.1218
--- php-src/NEWS:1.2027.2.547.2.1217Tue Sep  9 19:44:24 2008
+++ php-src/NEWSWed Sep 10 00:20:49 2008
@@ -62,6 +62,8 @@
 - Fixed bug #45312 (Segmentation fault on second request for array functions).
   (Dmitry)
 - Fixed bug #45251 (double free or corruption with setAttributeNode()). (Rob)
+- Fixed bug #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date 
string).
+  (Jeff Lawsons)
 - Fixed bug #45220 (curl_read callback returns -1 when needs to return 
   size_t (unsigned)). (Felipe)
 - Fixed bug #45181 (chdir() should clear relative entries in stat cache). 
@@ -110,6 +112,7 @@
   (Jani)
 - Fixed bug #42318 (problem with nm on AIX, not finding object files). (Dmitry)
 - Fixed bug #41348 (OCI8: allow compilation with Oracle 8.1). (Chris Jones)
+- Fixed bug #18916 (xmlrpc_set_type() "not working"). (Jeff Lawsons)
 
 01 May 2008, PHP 5.2.6
 - Fixed two possible crashes inside posix extension (Tony)



-- 
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/pgsql pgsql.c

2008-09-09 Thread Ilia Alshanetsky
iliaa   Wed Sep 10 01:39:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pgsql  pgsql.c 
  Log:
  Fixed unused var warning
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.24.2.13&r2=1.331.2.13.2.24.2.14&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.13 
php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.14
--- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.24.2.13  Mon Sep  8 01:33:07 2008
+++ php-src/ext/pgsql/pgsql.c   Wed Sep 10 01:39:35 2008
@@ -20,7 +20,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.331.2.13.2.24.2.13 2008/09/08 01:33:07 felipe Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.24.2.14 2008/09/10 01:39:35 iliaa Exp $ */
 
 #include 
 
@@ -3392,7 +3392,7 @@
int id = -1, name_len;
int argc = ZEND_NUM_ARGS();
PGconn *pgsql;
-   Oid wanted_oid, returned_oid;
+   Oid returned_oid;
 
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC,
 "rs|z", 
&pgsql_link, &file_in, &name_len, &oid) == SUCCESS) {
@@ -3430,6 +3430,7 @@
 #ifndef HAVE_PG_LO_IMPORT_WITH_OID
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "OID value passing 
not supported");
 #else
+   Oid wanted_oid;
switch (Z_TYPE_P(oid)) {
case IS_STRING:
{   



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