0

I am using Yii Framework and Developing an Application, I am having the following error when logging into the my application

Declaration of User::update() should be compatible with CActiveRecord::update($attributes = NULL)

While it was not getting before, I stopped working on the application for a week but after a week this is happening to me.

In my LIVE Server it is working fine while at localhost it is giving me the error.

I tried to google it and found the following StackOverflow Question Declaration of Methods should be Compatible with Parent Methods in PHP

But this Q/A did not solve my problem as this solution tells me to change every function while the same application on my LIVE Server is running smoothly.

Sorry for the English.

Community
  • 1
  • 1
Asad Nadeem
  • 509
  • 3
  • 6
  • 15

1 Answers1

0

Change the function in your User model to

update($attributes = null) { //bla }

instead of

update() { //bla }

Just like the error says the declaration of the function should be compatible with the one earlier defined in the parent class.

Jap Mul
  • 17,398
  • 5
  • 55
  • 66