ctools_var_export() exports a numeric value as a quoted string.

Patch coming.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Active » Needs review
FileSize
859 bytes

This is code taken from Features' version of the same function, features_var_export().

Probably needs testing with a variety of different imports, to make sure we're not introducing this bug: #1721926: Field Instance Export "weight" - brings me in a Override ping/pong - quotes and no quotes.

kenorb’s picture

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 3 year old patch to export.inc does not apply to the latest ctools 7.x-1.x-dev.

Checking patch includes/export.inc...
error: while searching for:
    // export and casting it back to an object when evaluated.
    $output = '(object) ' . ctools_var_export((array) $var, $prefix);
  }
  else if (is_bool($var)) {
    $output = $var ? 'TRUE' : 'FALSE';
  }

error: patch failed: includes/export.inc:880
error: includes/export.inc: patch does not apply
Snehal Brahmbhatt’s picture

FileSize
858 bytes

@Chris2, Here's the patch for the same, I reroll it for ctools 7.x-1.x-dev, hope this will help you.

Thanks!..

Snehal Brahmbhatt’s picture

Status: Needs work » Needs review
joelpittet’s picture

Issue tags: -Needs reroll

I like this but it may be too disruptive to existing exports so I'm hesitant to commit it.