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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

silvio’s picture

subscribe

mraichelson’s picture

subscribe

mraichelson’s picture

Not 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...

WD php: PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined:

[dump of entire SQL query]

 in variable_features_export_render() (line 175 of [local file path]/sites/all/modules/contrib/strongarm/strongarm.module).
Cannot modify header information - headers already sent by (output started at /usr/local/Cellar/drush/4.5/includes/drush.inc:596) bootstrap.inc:1207                                                     [warning]
Ryan258’s picture

Same problem, subscribe!

sylus’s picture

Same problem as well, subscribe!

Cyberwolf’s picture

Subscribing.

das-peter’s picture

Status: Active » Needs review
FileSize
591 bytes

Created 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.

lsolesen’s picture

Subscribe.

moonray’s picture

Same problem. Subscribing.

shawn_smiley’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #7 resolved the undefined property error for me.

jweowu’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.37 KB

I 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.

Shawn DeArmond’s picture

Tested #11 on 7.x-2.0-beta3, and it definitely fixed the errors.

goldlilys’s picture

Subscribing

Cyberwolf’s picture

The patch works here as well.

orakili’s picture

Same patch as #11 without prefix.

scor’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

@orakili: patches should include prefixes now since May 2011, it's the new git way :)

Confirmed the patch #11 solves this issue.

czigor’s picture

#11 works for me too.

Jon Pugh’s picture

#11 works great.

Commit that sucka!

jackalope’s picture

#11 works for me, thanks for the patches!

febbraro’s picture

Status: Reviewed & tested by the community » Fixed

Thank you everyone. Committed to 7.x branch. http://drupalcode.org/project/strongarm.git/commit/438d33b

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.