php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39524 Class declarations may not be nested
Submitted: 2006-11-15 13:51 UTC Modified: 2006-11-23 01:00 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:1 (20.0%)
From: depish at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 5.2.0 OS: Win XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: depish at gmail dot com
New email:
PHP Version: OS:

 

 [2006-11-15 13:51 UTC] depish at gmail dot com
Description:
------------
Fatal error: Class declarations may not be nested in C:\wamp\www\lowerfees3\classes\lf_page.class.php on line 1489


Reproduce code:
---------------
line 1489:   class Error{
			public $errNo;
			public $errMsg;
			public $errDesc;

			function __construct($msg=null,$desc=null,$no=null){
				$this->errNo = $no;
				$this->errMsg = $msg;
				$this->errDesc = $desc;
			}

			function ToString(){
				$msg  = '';
				if (null != $this->errNo)
					$msg .= $this->errNo.": ";
				if (null != $this->errMsg)
					$msg .= $this->errMsg;
				if (null != $this->errDesc)
					$msg .= "\\n".$this->errDesc;
				return $msg;
			}
		}

Expected result:
----------------
no error working fine to prior version

Actual result:
--------------
Fatal error: Class declarations may not be nested in C:\wamp\www\lowerfees3\classes\lf_page.class.php on line 1489


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-15 14:01 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2006-11-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC