Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7643589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:29:12+00:00 2026-05-31T09:29:12+00:00

My code was working fine in php 5.3.2-1 on ubuntu. I recently ported it

  • 0

My code was working fine in php 5.3.2-1 on ubuntu. I recently ported it to windows with XAMPP installed in it. It uses php 5.3.8 . I am getting error.

 Non-static method Following::getUpdates() should not be called statically, assuming $this from incompatible context

What is way to go?
Shall i correct my code to replace declaration at each place in code OR
Is there way to simulate the old behavior(php 5.3.2 with php.ini file) because i am not sure how much more error will be thrown at my face after correcting it.

UPDATE (code sample)

public function actionIndex(){
        if(yii::app()->user->isGuest){
            $this->render('guestIndex');
        }
        else{
            $dataProvider = Following::getUpdates(yii::app()->user->id);    //genrerate data for the homepage of user i.e updates from followers
            $this->render('userIndex',array('dataProvider'=>$dataProvider));
        }


    }

Getting the error on line $dataProvider = Following::getUpdates(yii::app()->user->id);
I am using yii framework.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:29:13+00:00Added an answer on May 31, 2026 at 9:29 am

    Your new installation likely just includes E_STRICT warnings while your previous installation didn’t. Quoting the manual:

    Calling non-static methods statically generates an E_STRICT level warning.

    This implies you can get rid of the warnings by disabling E_STRICT in your error reporting, but IMO you should fix the offending code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This piece of code is working fine with normal php: <?php function barber($type) {
The same code was working fine on lighttpd and apache, recently I switched to
I need to display PHP code using WxStyledTextCtrl. All is working fine except code
I have some PHP code that was at one point WORKING FINE. It makes
I have following PHP code: if($_SESSION['msg']['login-err']) { echo '<p class=error>'.$_SESSION['msg']['login-err'].'</p>'; unset($_SESSION['msg']['login-err']); } Everything working
Ok the following php code is working fine <?php $json = file_get_contents('http://tiny.cc/example22'); $obj =
I’m trying to issue web requests asynchronously. I have my code working fine except
So basically this code was working fine before. I had some computer issues and
This is really strange but this code is working fine unless the value entered
My code was working absolutely fine before the launch of iPhone SDK 3.0 ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.