php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60173 Wrong message on trait instantiation
Submitted: 2011-10-30 00:06 UTC Modified: 2011-10-31 22:59 UTC
From: php-bugs at majkl578 dot cz Assigned: gron (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4SVN-2011-10-29 (snap) OS:
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: php-bugs at majkl578 dot cz
New email:
PHP Version: OS:

 

 [2011-10-30 00:06 UTC] php-bugs at majkl578 dot cz
Description:
------------
Wrong error message when trait is being instanciated using reflection or being unserialized by unserialize().

Test script:
---------------
trait Test
{}

$rc = new ReflectionClass('Test');
$rc->newInstance();

Expected result:
----------------
Fatal error: Cannot instantiate trait Test in %s on line %d

Actual result:
--------------
Fatal error: Cannot instantiate abstract class Test in %s on line %d

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-31 22:28 UTC] gron@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: gron
 [2011-10-31 22:58 UTC] gron@php.net
Automatic comment from SVN on behalf of gron
Revision: http://svn.php.net/viewvc/?view=revision&revision=318621
Log: Fixed Bug #60173 (Wrong error message on reflective trait instantiation)
 [2011-10-31 22:59 UTC] gron@php.net
-Status: Assigned +Status: Closed
 [2011-10-31 22:59 UTC] gron@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fixed with SVN rev. 318621.
 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of gron
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ada5cda0eccb6b33ff00178de06e7190fa7c7798
Log: Fixed Bug #60173 (Wrong error message on reflective trait instantiation)
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of gron
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ada5cda0eccb6b33ff00178de06e7190fa7c7798
Log: Fixed Bug #60173 (Wrong error message on reflective trait instantiation)
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of gron
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ada5cda0eccb6b33ff00178de06e7190fa7c7798
Log: Fixed Bug #60173 (Wrong error message on reflective trait instantiation)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 03:01:32 2024 UTC