Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A lot of warnings about non-static methods called statically #6

Open
niutech opened this issue Apr 17, 2013 · 3 comments
Open

A lot of warnings about non-static methods called statically #6

niutech opened this issue Apr 17, 2013 · 3 comments

Comments

@niutech
Copy link

niutech commented Apr 17, 2013

There are many PHP warnings about statically calling non-static methods:

( ! ) Warning: Creating default object from empty value in cobaltcrm\includes\application.php on line 506
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.1065  2465712 Cobalt->getTemplate( TRUE ) ..\application.php:344


( ! ) Strict standards: Non-static method CobaltHelperUsers::isAdmin() should not be called statically, assuming $this from incompatible context in cobaltcrm\themes\default\index.php on line 12
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   15.9645 6941088 JApplicationWeb->render( )  ..\web.php:259
4   15.9648 6941688 JDocumentHTML->parse( array ('template' => 'default', 'file' => 'index.php', 'params' => NULL, 'directory' => 'cobaltcrm/themes') ) ..\web.php:326
5   15.9648 6941712 JDocumentHTML->_fetchTemplate( array ('template' => 'default', 'file' => 'index.php', 'params' => NULL, 'directory' => 'cobaltcrm/themes') )    ..\html.php:443
6   15.9660 6942584 JDocumentHTML->_loadTemplate( 'cobaltcrm/themes/default', 'index.php' ) ..\html.php:631
7   15.9664 6963000 require( 'cobaltcrm\themes\default\index.php' ) ..\html.php:571

( ! ) Strict standards: Non-static method CobaltHelperUsers::getUserId() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\users.php on line 631
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   15.9645 6941088 JApplicationWeb->render( )  ..\web.php:259
4   15.9648 6941688 JDocumentHTML->parse( array ('template' => 'default', 'file' => 'index.php', 'params' => NULL, 'directory' => 'cobaltcrm/themes') ) ..\web.php:326
5   15.9648 6941712 JDocumentHTML->_fetchTemplate( array ('template' => 'default', 'file' => 'index.php', 'params' => NULL, 'directory' => 'cobaltcrm/themes') )    ..\html.php:443
6   15.9660 6942584 JDocumentHTML->_loadTemplate( 'cobaltcrm/themes/default', 'index.php' ) ..\html.php:631
7   15.9664 6963000 require( 'cobaltcrm\themes\default\index.php' ) ..\html.php:571
8   15.9859 6963296 CobaltHelperUsers->isAdmin( ??? )   ..\index.php:12

( ! ) Strict standards: Non-static method CobaltHelperCobalt::loadHelpers() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\cobalt.php on line 18
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352

( ! ) Strict standards: Declaration of CRMText::_() should be compatible with JText::_($string, $jsSafe = false, $interpretBackSlashes = true, $script = false) in cobaltcrm\libraries\crm\helpers\crmtext.php on line 15
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.2381  2570640 CobaltHelperCobalt->loadHelpers( )  ..\cobalt.php:18
6   1.2418  2777184 require_once( 'cobaltcrm\libraries\crm\helpers\crmtext.php' )   ..\cobalt.php:289

( ! ) Strict standards: Declaration of CRMText::script() should be compatible with JText::script($string = NULL, $jsSafe = false, $interpretBackSlashes = true) in cobaltcrm\libraries\crm\helpers\crmtext.php on line 15
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.2381  2570640 CobaltHelperCobalt->loadHelpers( )  ..\cobalt.php:18
6   1.2418  2777184 require_once( 'cobaltcrm\libraries\crm\helpers\crmtext.php' )   ..\cobalt.php:289

( ! ) Strict standards: Declaration of CobaltPagination::_item_active() should be compatible with JPagination::_item_active(JPaginationObject $item) in cobaltcrm\libraries\crm\helpers\pagination.php on line 21
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.2381  2570640 CobaltHelperCobalt->loadHelpers( )  ..\cobalt.php:18
6   1.3027  3731552 require_once( 'cobaltcrm\libraries\crm\helpers\pagination.php' )    ..\cobalt.php:289

( ! ) Strict standards: Declaration of CobaltPagination::_item_inactive() should be compatible with JPagination::_item_inactive(JPaginationObject $item) in cobaltcrm\libraries\crm\helpers\pagination.php on line 21
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.2381  2570640 CobaltHelperCobalt->loadHelpers( )  ..\cobalt.php:18
6   1.3027  3731552 require_once( 'cobaltcrm\libraries\crm\helpers\pagination.php' )    ..\cobalt.php:289

( ! ) Strict standards: Non-static method CobaltHelperUsers::loadLanguage() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\cobalt.php on line 21
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352

( ! ) Strict standards: Non-static method CobaltHelperUsers::getLanguage() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\users.php on line 715
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.3540  3837496 CobaltHelperUsers->loadLanguage( )  ..\cobalt.php:21

( ! ) Strict standards: Non-static method CobaltHelperUsers::getUserId() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\users.php on line 693
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.3540  3837496 CobaltHelperUsers->loadLanguage( )  ..\cobalt.php:21
6   1.3687  3853928 CobaltHelperUsers->getLanguage( )   ..\users.php:715

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\helpers\users.php on line 697
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.3540  3837496 CobaltHelperUsers->loadLanguage( )  ..\cobalt.php:21
6   1.3687  3853928 CobaltHelperUsers->getLanguage( )   ..\users.php:715

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\helpers\users.php on line 716
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.3540  3837496 CobaltHelperUsers->loadLanguage( )  ..\cobalt.php:21

( ! ) Strict standards: Non-static method CobaltHelperDate::getSiteTimezone() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\cobalt.php on line 24
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\cobalt.php on line 52
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352

( ! ) Strict standards: Non-static method CobaltHelperTemplate::loadToolbar() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\cobalt.php on line 65
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\model\menu.php on line 65
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65
6   1.4764  4040952 CobaltModelMenu->getMenu( ) ..\template.php:92

( ! ) Strict standards: Non-static method CobaltHelperStyles::getSiteLogo() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\template.php on line 103
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\helpers\styles.php on line 32
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65
6   1.5114  4059200 CobaltHelperStyles->getSiteLogo( )  ..\template.php:103

( ! ) Strict standards: Non-static method CobaltHelperStyles::getSiteName() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\template.php on line 105
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65

( ! ) Strict standards: Only variables should be assigned by reference in cobaltcrm\libraries\crm\helpers\styles.php on line 17
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65
6   1.5463  4059544 CobaltHelperStyles->getSiteName( )  ..\template.php:105

( ! ) Strict standards: Non-static method CobaltHelperUsers::isAdmin() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\template.php on line 127
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65

( ! ) Strict standards: Non-static method CobaltHelperUsers::getUserId() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\users.php on line 631
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65
6   1.9333  4084656 CobaltHelperUsers->isAdmin( ??? )   ..\template.php:127

( ! ) Strict standards: Non-static method CobaltHelperUsers::getLoggedInUser() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\template.php on line 131
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65

( ! ) Strict standards: Non-static method CobaltHelperUsers::getEmails() should not be called statically, assuming $this from incompatible context in cobaltcrm\libraries\crm\helpers\users.php on line 598
Call Stack
#   Time    Memory  Function    Location
1   0.0010  133872  {main}( )   ..\index.php:0
2   1.1063  2465384 JApplicationWeb->execute( ) ..\index.php:53
3   1.1064  2465504 Cobalt->doExecute( )    ..\web.php:247
4   1.2223  2511728 require_once( 'cobaltcrm\libraries\crm\cobalt.php' )    ..\application.php:352
5   1.4731  4021888 CobaltHelperTemplate->loadToolbar( )    ..\cobalt.php:65
6   1.9884  4102448 CobaltHelperUsers->getLoggedInUser( )   ..\template.php:131
@raviufor
Copy link

I found a solution. After installation find configuration.php file (this file will appear only after instalation) Opend with any editor and change

public $error_reporting = 'maximum';

to

   public $error_reporting = 'minimum';

This will solve it for sure.

I tried it.

The developer needs to change it.

@niutech
Copy link
Author

niutech commented Jun 26, 2013

No, it doesn't solve the issues, but only hides them to the user. The code needs to be fixed.

@raviufor
Copy link

well.

Its just hides it and make the package work..

also the developer needs to change the code to fix it..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants