method Welcome::index() cannot be called statically #1970

Closed
hakimihamdan88 opened this Issue Nov 5, 2012 · 6 comments

Comments

Projects
None yet
2 participants

method Welcome::index() cannot be called statically
system/core/CodeIgniter.php 298

@narfbg can you verify is this a bug?

Contributor

narfbg commented Nov 5, 2012

Which PHP version are you using?

Contributor

narfbg commented Nov 5, 2012

Well, I'm running PHP 5.3 as well. Are you sure that you're giving the exact case where it fails and that it's not a duplicate of #1967 (PHP4-style constructor, e.g. Index::index())?

$ php -v
PHP 5.3.5-1ubuntu7.11 with Suhosin-Patch (cli) (built: Sep 12 2012 18:49:41) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

$ php -a
Interactive shell

php > error_reporting(E_ALL | E_STRICT);
php > class Welcome { public function index() {} }
php > var_dump(is_callable(array('Welcome', 'index')));
bool(true)

opps. sorry 5.2.17

Contributor

narfbg commented Nov 5, 2012

Well, I guess is_callable() will never behave properly, ever.

same as the others Non-static method Cron::category() cannot be called statically

@narfbg narfbg added a commit that referenced this issue Nov 5, 2012

@narfbg narfbg Revert usage of is_callable() in system/core/CodeIgniter.php
Seems to be causing issues (see #1970).
Also updated the Controller docs, mainly to include an important note related to #1967.
522c736

narfbg closed this Nov 5, 2012

@nonchip nonchip pushed a commit to nonchip/CodeIgniter that referenced this issue Jun 29, 2013

@narfbg narfbg Revert usage of is_callable() in system/core/CodeIgniter.php
Seems to be causing issues (see #1970).
Also updated the Controller docs, mainly to include an important note related to #1967.
9354376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment