Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By upgrading to PHP5.4.6 on the server comes this error:
Warning: Creating default object from empty value in groundwork_preprocess_html () (line 16 of xx/sites/all/themes/groundwork/groundwork/inc/template.process.inc).
Line 16 = $variables['rdf']->version = 'version="HTML+RDFa 1.1"';
How to fix this?
Comment | File | Size | Author |
---|---|---|---|
#2 | groundwork_preprocess_html.png | 6.51 KB | wismbuh |
Comments
Comment #1
Ole Martin CreditAttribution: Ole Martin commentedUsing negosyante 7.x-1.0
Comment #2
wismbuh CreditAttribution: wismbuh commentedme too gan,
My Envi:
D7.19
PHP5.3.8
Negosyante 7.x-1.0
Groundwork 7.x-1.3
and, Only on home this warning not shown...
please help
Comment #3
javamonkey CreditAttribution: javamonkey commentedNewer versions of PHP are stricter so objects need to be declared (created) before using them. I don't know if this will be the solution the developer of this project will take but for the moment I solved it on my site by adding a line in two places to create the object. So far it works, no error reported and nothing broken elsewhere. Try it at your own risk.
Edit \sites\all\themes\groundwork\inc\template.process.inc and insert the line where I indicate:
It is added twice so it works with both sides of the if/else condition. You could add it just once above the if/else test but I decided to put it right where the error happens as my temporary solution.