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.
Hi @all,
I just updated to the new 7.x-2.0-beta3 version. When you now recreate a feature using the UI, you get the following PHP error:
Notice: Undefined property: stdClass::$in_code_only in variable_features_export() (line 158 of path/to/strongarm.module).
I guess there is missing an isset in the if construct like so:
if(!isset($vars[$object_name]) || (isset($vars[$object_name]->in_code_only) && $vars[$object_name]->in_code_only)) {
Hope to see this fixed soon ;-)
Thanx in advance & cheers
TOM
Comments
Comment #1
silvio CreditAttribution: silvio commentedsubscribe
Comment #2
mraichelson CreditAttribution: mraichelson commentedsubscribe
Comment #3
mraichelson CreditAttribution: mraichelson commentedNot positive if this is coming from the same thing or not (if not glad to branch to another ticket) but when trying to do features updates via Drush in some cases I'm receiving the following...
Comment #4
Ryan258 CreditAttribution: Ryan258 commentedSame problem, subscribe!
Comment #5
sylus CreditAttribution: sylus commentedSame problem as well, subscribe!
Comment #6
Cyberwolf CreditAttribution: Cyberwolf commentedSubscribing.
Comment #7
das-peter CreditAttribution: das-peter commentedCreated patch & changed condition part
(isset($vars[$object_name]->in_code_only) && $vars[$object_name]->in_code_only)
to
!empty($vars[$object_name]->in_code_only)
empty()
checks automatically if the property exists.Comment #8
lsolesen CreditAttribution: lsolesen commentedSubscribe.
Comment #9
moonray CreditAttribution: moonray commentedSame problem. Subscribing.
Comment #10
shawn_smiley CreditAttribution: shawn_smiley commentedThe patch in #7 resolved the undefined property error for me.
Comment #11
jweowu CreditAttribution: jweowu commentedI agree with using empty() in place of isset(). ctools currently only sets this property to TRUE or not at all, but it doesn't make sense to assume that it could never be FALSE in the future. This change also needs to be made elsewhere in strongarm, however. Patch attached.
Comment #12
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedTested #11 on 7.x-2.0-beta3, and it definitely fixed the errors.
Comment #13
goldlilys CreditAttribution: goldlilys commentedSubscribing
Comment #14
Cyberwolf CreditAttribution: Cyberwolf commentedThe patch works here as well.
Comment #15
orakili CreditAttribution: orakili commentedSame patch as #11 without prefix.
Comment #16
scor CreditAttribution: scor commented@orakili: patches should include prefixes now since May 2011, it's the new git way :)
Confirmed the patch #11 solves this issue.
Comment #17
czigor CreditAttribution: czigor commented#11 works for me too.
Comment #18
Jon Pugh#11 works great.
Commit that sucka!
Comment #19
jackalope CreditAttribution: jackalope commented#11 works for me, thanks for the patches!
Comment #20
febbraro CreditAttribution: febbraro commentedThank you everyone. Committed to 7.x branch. http://drupalcode.org/project/strongarm.git/commit/438d33b
Comment #22
vectoroc CreditAttribution: vectoroc commented#1402576: Notice: Undefined property: stdClass::$in_code_only in variable_features_export() (line 159 of path/to/strongarm.module).