Jump to content


Photo

Error creating default object.

Class library

Best Answer Simon_P , 13 May 2014 - 12:00 PM

php 5.4 introduced a new STRICT mode in php and in 5.5 it was turned on by default.

 

Those errors are actually just warnings, and are perfectly fine to be ignored buy adjusting the error log level.

Go to the full post


  • Please log in to reply
12 replies to this topic

#1 ebadia

ebadia

    Newbie

  • Members
  • 5 posts
  • Country: Country Flag

Posted 13 May 2014 - 11:58 AM

Hi to all, I just joined a company and I am the responsible for their websites. we have few and all made with Platform Pro.

Few days ago, we got an error. We did not change anything so I guess some version issue could be in place...

In our website we have word press 3.9 and the hosting site uses php 5.5.

I have been trying and when I change the php to 5.3 in the hosting site the error disappears but with 5.4 and 5.5 we get the error.

 

Does anyone know why this could be happening?

We have deactivated the errors so the page seems to be fine but I would like to know if some incompatibility is in place with platform pro and latest php versions.

 

Error examples:

Warning: Creating default object from empty value in /home3/clinica/public_html/zivingsabadell.com/wp-content/themes/platformpro/core/library/class.layout.php on line 321

 

Warning: Creating default object from empty value in /home3/clinica/public_html/zivingsabadell.com/wp-content/themes/platformpro/core/library/class.layout.php on line 321

 

Warning: Creating default object from empty value in /home3/clinica/public_html/zivingsabadell.com/wp-content/themes/platformpro/core/library/class.options.metapanel.php on line 54

 

Warning: Creating default object from empty value in /home3/clinica/public_html/zivingsabadell.com/wp-content/themes/platformpro/core/library/class.options.metapanel.php on line 54

 

 

Thanks!!!



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 13 May 2014 - 12:00 PM   Best Answer

php 5.4 introduced a new STRICT mode in php and in 5.5 it was turned on by default.

 

Those errors are actually just warnings, and are perfectly fine to be ignored buy adjusting the error log level.



#3 ebadia

ebadia

    Newbie

  • Members
  • 5 posts
  • Country: Country Flag

Posted 13 May 2014 - 02:13 PM

Thanks a lot for the info!



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17124 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 14 May 2014 - 10:00 AM

Thanks for informing us the issue has been resolved.



#5 ebadia

ebadia

    Newbie

  • Members
  • 5 posts
  • Country: Country Flag

Posted 14 May 2014 - 10:41 AM

I marked solved since Simon_P told me that was normal and should not worry about... But the warnings are still there. 



#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 May 2014 - 11:13 AM

the platformpro zip has been updated with a fix, you can see what was edited here: 

 

https://github.com/p...ons.php#L11-L13



#7 ebadia

ebadia

    Newbie

  • Members
  • 5 posts
  • Country: Country Flag

Posted 14 May 2014 - 11:45 AM

So I should download this new .zip? Where is it posted?

I am sorry for the dummy questions but I am totally new at this.

 

Thanks in advance



#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 May 2014 - 04:43 PM

Either download the new zip file from your account area on pagelines.com or simply edit that one file.



#9 belfusion

belfusion

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationPerth
  • Country: Country Flag

Posted 14 June 2014 - 12:15 AM

Hi guys. I am having this same error on a website I have just taken over management of.

 

I have tried updating the functions.php with your suggestion but got even worse errors so went back to what I had.

Any updates?

The site is perthtrades.com.au and appears when you click on the blog.

Thanks



#10 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 14 June 2014 - 07:46 PM

Hi guys. I am having this same error on a website I have just taken over management of.
 
I have tried updating the functions.php with your suggestion but got even worse errors so went back to what I had.
Any updates?

The site is perthtrades.com.au and appears when you click on the blog.
Thanks


Your site is hidden behind a coming soon plugin.

If you created more errors by editing the functions.php perhaps you should post the errors you are getting.

As I said at the top of this topic simply lowering the PHP error level will suppress all these warnings.
Ask your host how to suppress PHP warnings and notices, they should be turned off on a production server anyway!

#11 belfusion

belfusion

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationPerth
  • Country: Country Flag

Posted 14 June 2014 - 11:16 PM

Hi Simon.
We enabled the site maintenance while we tried to fix the errors. The errors we are getting are during certain aspects of user selection, for example, if you click on blog and info from the top menu, you get these errors. Using the above solution to suppress PHP made the errors worse.


Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 163

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 166

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 169

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 172

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 175

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 177

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 179

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 201

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 205

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 223

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 224

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 226

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 320

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 320

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 320

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 320



#12 belfusion

belfusion

    Newbie

  • Members
  • Pip
  • 3 posts
  • LocationPerth
  • Country: Country Flag

Posted 14 June 2014 - 11:49 PM

I'm also getting this error if I enable Jetpack plugin on the dashboard:
 

Warning: Creating default object from empty value in /home/mickcascades/public_html/perthtrades.com.au/wp-content/themes/platformpro/core/library/class.layout.php on line 163

 

Suppressing this error would mean not being able to access my Jetpack stats.



#13 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 15 June 2014 - 12:00 AM

Turning off php error logging would not create php warnings/notices.

Did you ask your host to turn error logging off? Maybe they have disabled disabling it?