Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP 5.4 Trait issue

3 views
Skip to first unread message

Ehask

unread,
Jun 30, 2015, 12:40:39 AM6/30/15
to
Hey All,

I am trying to get cakephp 3 up and running on my CPanel Dedicated box. It is running PHP 5.4.41 which should support Trait's yet

<?php
trait Foo {

private static $conf;

public static function config($a) {
static::$conf = $a;
}
}

class Bar {


use Foo {
config as protected _config;
}

public static function config($a) {
static::_config($a);
}
}

Bar::config(['a']);

Results in this error:

Fatal error: Call to undefined method Bar::_config() in /home/farsight/public_html/cake3/webroot/index.php on line 19

Does anyone know if 5.4.41 was broken?
0 new messages