Bug #69164 [Opn]: Wrong error message when a trait extends another trait
Edit report at https://bugs.php.net/bug.php?id=69164&edit=1
ID: 69164
Updated by: laruence@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:
This should only be in version 5.x..
Previous Comments:
------------------------------------------------------------------------
[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
Thread (4 messages)