php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18598 wrong Line-Break-syntax
Submitted: 2002-07-26 12:06 UTC Modified: 2002-07-26 13:13 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: kh at nextweb dot ch Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.2.2 OS: Irix 6.5.11
Private report: No CVE-ID: None
 [2002-07-26 12:06 UTC] kh at nextweb dot ch
The file ext/standard/datetime.c contains wrong line-breaks starting at line 597 and ending on line 600:

 if (NULL == (ta = php_localtime_r(&timestamp, &tmbuf))) {^M
    php_error(E_WARNING, "%s(): invalid local time",^M
                  get_active_function_name(TSRMLS_C));^M
    RETURN_FALSE;^M

On my Irix-system with SGI cc this leads to the following errors when compiling:

>>>>>>>>>>>>>>>>>>>>>
"datetime.c", line 600: error(1029): expected an expression
                RETURN_FALSE;
                             ^

"datetime.c", line 601: error(1065): expected a ";"
        }
        ^

"datetime.c", line 768: warning(1110): statement is unreachable
                        break;
                        ^

8 errors detected in the compilation of "datetime.c".
*** Error code 2 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
<<<<<<<<<<<<<<<<<<<<<

Simply removing the "^M" at the end of these four lines resolves the problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-26 13:13 UTC] derick@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 14:01:28 2024 UTC