[PHP-CVS] com php-src: Coding style, ANSI C compatibility: ext/date/php_date.c
Commit:d7da1aa694a9a29ca7ec772e5d51d96b6dc8dda0 Author:Lars Strojny lstro...@php.net Sun, 6 Jan 2013 14:08:23 +0100 Parents: a426e0b05074621643c44b67ed2d0d8674721bf5 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d7da1aa694a9a29ca7ec772e5d51d96b6dc8dda0 Log: Coding style, ANSI C compatibility Changed paths: M ext/date/php_date.c Diff: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 1837f94..765b0bf 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -847,7 +847,7 @@ timelib_tzinfo *php_date_parse_tzfile_wrapper(char *formal_tzname, const timelib } /* }}} */ -// created this callback method to check the date.timezone only when changed, to increase performance and error on an ini_set line +/* Callback to check the date.timezone only when changed increases performance */ /* {{{ static PHP_INI_MH(OnUpdate_date_timezone) */ static PHP_INI_MH(OnUpdate_date_timezone) { @@ -872,7 +872,7 @@ static PHP_INI_MH(OnUpdate_date_timezone) static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC) { /* Checking configure timezone */ - if (DATEG(timezone) strlen(DATEG(timezone)) 0) { + if (DATEG(timezone) (strlen(DATEG(timezone))) 0) { return DATEG(timezone); } /* Check config setting for default timezone */ @@ -880,11 +880,12 @@ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC) /* Special case: ext/date wasn't initialized yet */ zval ztz; - if (SUCCESS == zend_get_configuration_directive(date.timezone, sizeof(date.timezone), ztz) Z_TYPE(ztz) == IS_STRING Z_STRLEN(ztz) 0 timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) { + if (SUCCESS == zend_get_configuration_directive(date.timezone, sizeof(date.timezone), ztz) +Z_TYPE(ztz) == IS_STRING Z_STRLEN(ztz) 0 timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) { return Z_STRVAL(ztz); } } else if (*DATEG(default_timezone)) { - if (DATEG(timezone_valid) == 1) { // timezone already checked and validated + if (DATEG(timezone_valid) == 1) { return DATEG(default_timezone); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Adding test for bug #63462: tests/classes/bug63462.phpt
Commit:bdc1e2302ce57f6763c50d03bf987261f34f1d2b Author:Lars Strojny lstro...@php.net Sun, 6 Jan 2013 14:46:49 +0100 Parents: d7da1aa694a9a29ca7ec772e5d51d96b6dc8dda0 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bdc1e2302ce57f6763c50d03bf987261f34f1d2b Log: Adding test for bug #63462 Bugs: https://bugs.php.net/63462 Changed paths: A tests/classes/bug63462.phpt Diff: diff --git a/tests/classes/bug63462.phpt b/tests/classes/bug63462.phpt new file mode 100644 index 000..dc5edbd --- /dev/null +++ b/tests/classes/bug63462.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test script to verify that magic methods should be called only once when accessing an unset property. +--CREDITS-- +Marco Pivetta ocram...@gmail.com +--XFAIL-- +Bug 63462 is not yet fixed +--FILE-- +?php +class Test { + public$publicProperty; + protected $protectedProperty; + private $privateProperty; + + public function __construct() { + unset( + $this-publicProperty, + $this-protectedProperty, + $this-privateProperty + ); + } + + function __get($name) { + echo '__get ' . $name . \n; + return $this-$name; + } + + function __set($name, $value) { + echo '__set ' . $name . \n; + $this-$name = $value; + } + + function __isset($name) { + echo '__isset ' . $name . \n; + return isset($this-$name); + } +} + +$test = new Test(); + +$test-nonExisting; +$test-publicProperty; +$test-protectedProperty; +$test-privateProperty; +isset($test-nonExisting); +isset($test-publicProperty); +isset($test-protectedProperty); +isset($test-privateProperty); +$test-nonExisting = 'value'; +$test-publicProperty = 'value'; +$test-protectedProperty = 'value'; +$test-privateProperty = 'value'; + +? + +--EXPECTF-- +__get nonExisting +Notice: Undefined index: nonExisting in %__set__get_006.php on line %d +__get publicProperty +Notice: Undefined index: publicProperty in %__set__get_006.php on line %d +__get protectedProperty +Notice: Undefined index: protectedProperty in %__set__get_006.php on line %d +__get privateProperty +Notice: Undefined index: privateProperty in %__set__get_006.php on line %d +__isset nonExisting +__isset publicProperty +__isset protectedProperty +__isset privateProperty +__set nonExisting +__set publicProperty +__set protectedProperty +__set privateProperty -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add unit test for mail.log ini setting.: ext/standard/tests/mail/mail_log.phpt
Commit:371372714dcac655f53a53ef4d45ad02916b4f4a Author:Martin Jansen mar...@divbyzero.net Sun, 6 Jan 2013 08:59:10 +0100 Committer: Lars Strojny lstro...@php.net Sun, 6 Jan 2013 15:04:27 +0100 Parents: 4a3bf25e3ffa71d8d65df686c27903d7c9fafee6 Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=371372714dcac655f53a53ef4d45ad02916b4f4a Log: Add unit test for mail.log ini setting. Changed paths: A ext/standard/tests/mail/mail_log.phpt Diff: diff --git a/ext/standard/tests/mail/mail_log.phpt b/ext/standard/tests/mail/mail_log.phpt new file mode 100644 index 000..86346ec --- /dev/null +++ b/ext/standard/tests/mail/mail_log.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test mail() function : mail.log ini setting +--INI-- +sendmail_path=tee /tmp/mail.out /dev/null +mail.log = /tmp/mail.log +--SKIPIF-- +?php +if(substr(PHP_OS, 0, 3) == WIN) + die(skip Won't run on Windows); +? +--FILE-- +?php +date_default_timezone_set(UTC); + +$logfile = ini_get(mail.log); +if (file_exists($logfile)) { + unlink($logfile); +} +touch($logfile); +clearstatcache(); + +$to = t...@example.com; +$subject = mail.log test; +$message = Testing mail.log; +$headers = X-Test: 1; + +var_dump(filesize($logfile) == 0); +clearstatcache(); + +var_dump(mail($to, $subject, $message, $headers)); + +var_dump(filesize($logfile) 0); +clearstatcache(); + +echo file_get_contents($logfile); +? +Done +--CLEAN-- +?php +unlink(/tmp/mail.log); +unlink(/tmp/mail.out); +? +--EXPECTF-- +bool(true) +bool(true) +bool(true) +[%d-%s-%d %d:%d:%d UTC] mail() on [%smail_log.php:%d]: To: t...@example.com -- Headers: X-Test: 1 +Done -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: News entry for bug #52126: NEWS
Commit:a951693cfb17b8d84de4882f47ba6f7d6a776556 Author:Lars Strojny lstro...@php.net Sun, 6 Jan 2013 15:13:32 +0100 Parents: 371372714dcac655f53a53ef4d45ad02916b4f4a Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a951693cfb17b8d84de4882f47ba6f7d6a776556 Log: News entry for bug #52126 Bugs: https://bugs.php.net/52126 Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 1ad954a..cfd2aa3 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ PHP NEWS (Nikita Popov) . Add Generator::throw() method. (Nikita Popov) . Bug #23955: allow specifying Max-Age attribute in setcookie() (narfbg, Lars) + . Bug #52126: timestamp for mail.log (Martin Jansen, Lars) - cURL: . Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Add a timestamp to the mail log.: ext/standard/mail.c
Commit:4a3bf25e3ffa71d8d65df686c27903d7c9fafee6 Author:Martin Jansen mar...@divbyzero.net Mon, 24 Dec 2012 11:11:28 +0100 Committer: Lars Strojny lstro...@php.net Sun, 6 Jan 2013 15:04:19 +0100 Parents: 853ef3c9cba5458e403f627103d12351f88ec52f Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4a3bf25e3ffa71d8d65df686c27903d7c9fafee6 Log: Add a timestamp to the mail log. This patch is loosely based on the one in bug #52126 but instead of using a UNIX timestamp it uses the date format also being used by error_log et al. Bugs: https://bugs.php.net/52126 Changed paths: M ext/standard/mail.c Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 2576681..c8fd55e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -21,10 +21,12 @@ #include stdlib.h #include ctype.h #include stdio.h +#include time.h #include php.h #include ext/standard/info.h #include ext/standard/php_string.h #include ext/standard/basic_functions.h +#include ext/date/php_date.h #if HAVE_SYSEXITS_H #include sysexits.h @@ -246,8 +248,15 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char return val; \ if (mail_log *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 : ); + char *tmp, *date_str; + time_t curtime; + + time(curtime); + date_str = php_format_date(d-M-Y H:i:s e, 13, curtime, 1 TSRMLS_CC); + + int l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); + + efree(date_str); if (hdr) { php_mail_log_crlf_to_spaces(tmp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Update news with new bug fix.: NEWS
Commit:67c662a0a2615d52215dccc4805e8eb989df7eab Author:Derick Rethans git...@derickrethans.nl Sun, 6 Jan 2013 15:08:26 + Parents: ff9c1b12ff9c9533367d0d6200eb39189ad0124c Branches: PHP-5.3 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=67c662a0a2615d52215dccc4805e8eb989df7eab Log: Update news with new bug fix. Changed paths: M NEWS Diff: diff --git a/NEWS b/NEWS index 0b5c207..ee76efb 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ PHP NEWS . Fixed bug #55438 (Curlwapper is not sending http header randomly). (php...@lostreality.org, Pierrick) +- Date: + . Fixed bug #55397 (comparsion of incomplete DateTime causes SIGSEGV). +(Laruence, Derick) + 20 Dec 2012, PHP 5.3.20 - Zend Engine: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Bug #63699: performance improvements for varios ext/date functions: NEWS ext/date/php_date.c ext/date/php_date.h
Nice! I have another suggestion to further improve the performance: make OnUpdate_date_timezone() update both 'timezone' and 'default_timezone'. The variable 'timezone_valid' can then be removed altogether. Thanks, Nuno P.S.: I know it was already there but while at it, can you please change 'strlen(DATEG(timezone)) 0' to '*DATEG(timezone)'. - Original Message - From: Lars Strojny lstro...@php.net To: php-cvs@lists.php.net Sent: Sunday, January 06, 2013 2:06 AM Subject: [PHP-CVS] com php-src: Bug #63699: performance improvements for varios ext/date functions: NEWS ext/date/php_date.c ext/date/php_date.h Commit:67557fcfcea2c22e9b8d9f0ba86f461c02002cb7 Author:Lars Strojny lstro...@php.net Sun, 6 Jan 2013 03:06:09 +0100 Parents: 2feea39a3320d100bae8a1193aba9022726a24ea Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=67557fcfcea2c22e9b8d9f0ba86f461c02002cb7 Log: Bug #63699: performance improvements for varios ext/date functions Bugs: https://bugs.php.net/63699 Changed paths: M NEWS M ext/date/php_date.c M ext/date/php_date.h Diff: diff --git a/NEWS b/NEWS index 91b7b46..75c9816 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,10 @@ PHP NEWS . Fixed bug #55438 (Curlwapper is not sending http header randomly). (php...@lostreality.org, Pierrick) +- Date: + . Fixed bug #63699 (Performance improvements for various ext/date functions). +(Lars, original patch by njaguar at gmail dot com) + 20 Dec 2012, PHP 5.4.10 - Core: diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ac119a3..1837f94 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -495,9 +495,11 @@ int php_date_global_timezone_db_enabled; /* on 90'35; common sunrise declaration (sun body disappeared) */ #define DATE_SUNRISE_ZENITH 90.58 +static PHP_INI_MH(OnUpdate_date_timezone); + /* {{{ INI Settings */ PHP_INI_BEGIN() - STD_PHP_INI_ENTRY(date.timezone, , PHP_INI_ALL, OnUpdateString, default_timezone, zend_date_globals, date_globals) + STD_PHP_INI_ENTRY(date.timezone, , PHP_INI_ALL, OnUpdate_date_timezone, default_timezone, zend_date_globals, date_globals) PHP_INI_ENTRY(date.default_latitude, DATE_DEFAULT_LATITUDE, PHP_INI_ALL, NULL) PHP_INI_ENTRY(date.default_longitude, DATE_DEFAULT_LONGITUDE, PHP_INI_ALL, NULL) PHP_INI_ENTRY(date.sunset_zenith, DATE_SUNSET_ZENITH, PHP_INI_ALL, NULL) @@ -599,6 +601,7 @@ static PHP_GINIT_FUNCTION(date) date_globals-default_timezone = NULL; date_globals-timezone = NULL; date_globals-tzcache = NULL; + date_globals-timezone_valid = 0; } /* }}} */ @@ -844,25 +847,53 @@ timelib_tzinfo *php_date_parse_tzfile_wrapper(char *formal_tzname, const timelib } /* }}} */ +// created this callback method to check the date.timezone only when changed, to increase performance and error on an ini_set line +/* {{{ static PHP_INI_MH(OnUpdate_date_timezone) */ +static PHP_INI_MH(OnUpdate_date_timezone) +{ + if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { + return FAILURE; + } + + DATEG(timezone_valid) = 0; + if (stage == PHP_INI_STAGE_RUNTIME) { + if (!timelib_timezone_id_is_valid(DATEG(default_timezone), DATE_TIMEZONEDB)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, DATE_TZ_ERRMSG); + } else { + DATEG(timezone_valid) = 1; + } + } + + return SUCCESS; +} +/* }}} */ + /* {{{ Helper functions */ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC) { /* Checking configure timezone */ - if (DATEG(timezone) (strlen(DATEG(timezone)) 0)) { + if (DATEG(timezone) strlen(DATEG(timezone)) 0) { return DATEG(timezone); } /* Check config setting for default timezone */ if (!DATEG(default_timezone)) { /* Special case: ext/date wasn't initialized yet */ zval ztz; - - if (SUCCESS == zend_get_configuration_directive(date.timezone, sizeof(date.timezone), ztz) - Z_TYPE(ztz) == IS_STRING - Z_STRLEN(ztz) 0 - timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) { + + if (SUCCESS == zend_get_configuration_directive(date.timezone, sizeof(date.timezone), ztz) Z_TYPE(ztz) == IS_STRING Z_STRLEN(ztz) 0 timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) { return Z_STRVAL(ztz); } - } else if (*DATEG(default_timezone) timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) { + } else if (*DATEG(default_timezone)) { + if (DATEG(timezone_valid) == 1) { // timezone already checked and validated + return DATEG(default_timezone); + } + + if (!timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid date.timezone value '%s', we selected the timezone 'UTC' for now., DATEG(default_timezone)); + return UTC; + } + + DATEG(timezone_valid) = 1; return DATEG(default_timezone); } /* Fallback to UTC */ diff --git a/ext/date/php_date.h b/ext/date/php_date.h index c9c1650..f0b662b 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h
[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/date/php_date.c
Commit:ba35ae32b7e9858e6590a616c4d5c2f0020cc7ab Author:Derick Rethans git...@derickrethans.nl Sun, 6 Jan 2013 15:07:13 + Parents: d7da1aa694a9a29ca7ec772e5d51d96b6dc8dda0 ff9c1b12ff9c9533367d0d6200eb39189ad0124c Branches: PHP-5.4 PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ba35ae32b7e9858e6590a616c4d5c2f0020cc7ab Log: Merge branch 'PHP-5.3' into PHP-5.4 Changed paths: MM ext/date/php_date.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: Merge branch 'PHP-5.4' into PHP-5.5: ext/date/php_date.c
Commit:4ff088d061ed3d4e15d38d0ed3f2fd10346c634c Author:Derick Rethans git...@derickrethans.nl Sun, 6 Jan 2013 15:07:25 + Parents: 9934efff5fa174b3ae87f3e6295a2fe48f7ebd6f ba35ae32b7e9858e6590a616c4d5c2f0020cc7ab Branches: PHP-5.5 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4ff088d061ed3d4e15d38d0ed3f2fd10346c634c Log: Merge branch 'PHP-5.4' into PHP-5.5 Changed paths: MM ext/date/php_date.c Diff: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: Add a timestamp to the mail log.: ext/standard/mail.c
Plesse always put the declaration on top of the current context, l in thus case. On Jan 6, 2013 3:14 PM, Lars Strojny lstro...@php.net wrote: Commit:4a3bf25e3ffa71d8d65df686c27903d7c9fafee6 Author:Martin Jansen mar...@divbyzero.net Mon, 24 Dec 2012 11:11:28 +0100 Committer: Lars Strojny lstro...@php.net Sun, 6 Jan 2013 15:04:19 +0100 Parents: 853ef3c9cba5458e403f627103d12351f88ec52f Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4a3bf25e3ffa71d8d65df686c27903d7c9fafee6 Log: Add a timestamp to the mail log. This patch is loosely based on the one in bug #52126 but instead of using a UNIX timestamp it uses the date format also being used by error_log et al. Bugs: https://bugs.php.net/52126 Changed paths: M ext/standard/mail.c Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 2576681..c8fd55e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -21,10 +21,12 @@ #include stdlib.h #include ctype.h #include stdio.h +#include time.h #include php.h #include ext/standard/info.h #include ext/standard/php_string.h #include ext/standard/basic_functions.h +#include ext/date/php_date.h #if HAVE_SYSEXITS_H #include sysexits.h @@ -246,8 +248,15 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char return val; \ if (mail_log *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 : ); + char *tmp, *date_str; + time_t curtime; + + time(curtime); + date_str = php_format_date(d-M-Y H:i:s e, 13, curtime, 1 TSRMLS_CC); + + int l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); + + efree(date_str); if (hdr) { php_mail_log_crlf_to_spaces(tmp); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] com php-src: fix windows build: ext/standard/mail.c
Commit:8a481c711a1c899971494d88086701ca783c6795 Author:Anatoliy Belsky a...@php.net Sun, 6 Jan 2013 18:37:26 +0100 Parents: 98331c89a178add153f9f30484f59300499fc742 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8a481c711a1c899971494d88086701ca783c6795 Log: fix windows build Changed paths: M ext/standard/mail.c Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index c8fd55e..4c243f7 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -250,11 +250,12 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char if (mail_log *mail_log) { char *tmp, *date_str; time_t curtime; + int l; time(curtime); date_str = php_format_date(d-M-Y H:i:s e, 13, curtime, 1 TSRMLS_CC); - int l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); + l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); efree(date_str); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: fix windows build: ext/standard/mail.c
Thanks for fixing. Could you merge to 5.5 as well? If not, I could do as well. -- Sent from my iPhone Am 06.01.2013 um 18:37 schrieb Anatoliy Belsky a...@php.net: Commit:8a481c711a1c899971494d88086701ca783c6795 Author:Anatoliy Belsky a...@php.net Sun, 6 Jan 2013 18:37:26 +0100 Parents: 98331c89a178add153f9f30484f59300499fc742 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8a481c711a1c899971494d88086701ca783c6795 Log: fix windows build Changed paths: M ext/standard/mail.c Diff: diff --git a/ext/standard/mail.c b/ext/standard/mail.c index c8fd55e..4c243f7 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -250,11 +250,12 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char if (mail_log *mail_log) { char *tmp, *date_str; time_t curtime; +int l; time(curtime); date_str = php_format_date(d-M-Y H:i:s e, 13, curtime, 1 TSRMLS_CC); -int l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); +l = spprintf(tmp, 0, [%s] mail() on [%s:%d]: To: %s -- Headers: %s\n, date_str, zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ); efree(date_str); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] com php-src: fix windows build: ext/standard/mail.c
Hi Lars, the issue was only 5.5 and master, 5.4 is fine. Everything is merged so no worries. Cheers Anatoliy On Sun, 2013-01-06 at 19:41 +0100, Lars Strojny wrote: Thanks for fixing. Could you merge to 5.5 as well? If not, I could do as well. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php