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.
This module throws "Strict warning: Creating default object from empty value in noderefcreate_autocomplete_validate". This error is because the code instantiated a default object (of type stdClass) implicitely. PHP is strict and doesn't accept this.
Comment | File | Size | Author |
---|---|---|---|
#6 | 1330274-Strict_warning_autocomplete_validate.patch | 884 bytes | nico.knaepen |
#1 | Strict_warning_creating_default_object_from_empty_value-1330274.patch | 1.54 KB | Begun |
Comments
Comment #1
Begun CreditAttribution: Begun commentedForgot to attach patch.
Comment #2
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedpatch does not apply cleanly... i.e. changes to .info
Comment #3
charlie-s CreditAttribution: charlie-s commentedIt also undoes what is referenced at http://drupal.org/node/1295112. Why are lines 88/89 being reverted? Isn't changing $newobject to new stdClass() instead of NULL adequate for this particular bug?
Comment #4
pringlz CreditAttribution: pringlz commentedHi! in 2012 was created patch from #1 comment. Now stable version is not patched! In 2014! Please, everybody, change the stable version 7.x-1.0 with this patch!
Comment #5
gusantor CreditAttribution: gusantor commentedHello
I'm using drupal 7.39, noderefcreate 7.x-1.0, install profile Minimal (minimal-7.39)
receiving this message when trying to create a node with field collection item with a noderefcreate field control
Warning: Creating default object from empty value en noderefcreate_autocomplete_validate() (línea 133 de /opt/dafweb/drupal/sites/all/modules/noderefcreate/noderefcreate.module).
I applied the patch in #1 , get 1 error
so I decided to copy noderefcreate.info, noderefcreate.module from a standard profile installation, warning gone
lucky me !
thanks
Comment #6
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion commentedThis part is already available in the 7.x-1.0. No need to re-apply this through a patch.
These changes are also included in version 7.x-1.0. Also no need to re-apply changes on this.
This is the only change that matters.