Bug #69164 [Opn]: Wrong error message when a trait extends another trait
| From: | sebastian@php.net | Date: | Tue, 03 Mar 2015 15:09:57 +0000 |
| Subject: | Bug #69164 [Opn]: Wrong error message when a trait extends another trait | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191089@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69164&edit=1
ID: 69164
Updated by: sebastian@php.net
Reported by: sebastian@php.net
Summary: Wrong error message when a trait extends another
trait
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Yes, seems like the error message was changed for PHP 7: http://3v4l.org/k33mV
Would be nice, though, to have this in all supported branches.
Previous Comments:
------------------------------------------------------------------------
[2015-03-03 15:01:53] laruence@php.net
This should only be in version 5.x..
------------------------------------------------------------------------
[2015-03-02 20:07:26] sebastian@php.net
Description:
------------
The error message for "trait extends trait" is wrong.
Test script:
---------------
<?php
trait t1
{
}
trait t2 extends t1
{
}
Expected result:
----------------
PHP Fatal error: A trait (t2) cannot extend a trait. Traits can only be composed from other traits
with the 'use' keyword. Error in /home/sb/test.php on line 7
Actual result:
--------------
PHP Fatal error: A trait (t2) cannot extend a class. Traits can only be composed from other traits
with the 'use' keyword. Error in /home/sb/test.php on line 7
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69164&edit=1