Hi,
I have that warning after perform custom pricing rule(drupal commerce) with actions:
-Calculate a value
-Set the unit price to a specific amount

Warning: Illegal string offset 'type' in rules_action_data_calc() (line 78 of [root]/sites/all/modules/rules/modules/data.eval.inc).

I looked at data.eval.inc and there is an array which haven't 'type' key...
Is this a bug or I done something wrong?

Files: 
CommentFileSizeAuthor
#5 rules-illegal-offset-1776582-5.patch568 bytespeterpoe
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules-illegal-offset-1776582-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#3 rules-illegal-offset-1776582-3.patch613 byteskrlucas
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules-illegal-offset-1776582-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

I had the same problem. I deleted lines 78, 79 and 80

if ($var_info['type'] == 'interger') {
$result = (int) $result;
}

and the problem goes away

This problem suddenly came up on a test site I didn't touch for a few weeks. I did, however, upgrade Ubuntu to 12.10. Haven't seen it before the upgrade, so that might have something to do with it.
PHP version right now is 5.4.6, in Ubuntu 12.04 it's currently 5.3.10

Status:Active» Needs review
StatusFileSize
new613 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules-illegal-offset-1776582-3.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

I encountered this same issue with PHP 5.4. Here's a patch.

Status:Needs review» Needs work

The last submitted patch, rules-illegal-offset-1776582-3.patch, failed testing.

Version:7.x-2.2» 7.x-2.x-dev
Status:Needs work» Needs review
StatusFileSize
new568 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch rules-illegal-offset-1776582-5.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

$var_info is never an array, since rules_array_key() extracts an array key.
(Hopefully) proper patch attached.

Status:Needs review» Reviewed & tested by the community

Reviewed @peterpoe's patch in #5 — it resolves Rules's misuse of rules_array_key(), and passes my tests. RTBC.

#3: rules-illegal-offset-1776582-3.patch queued for re-testing.

report the same problem. and hope fix this with the patch.

Status:Reviewed & tested by the community» Fixed

Good catch - thanks committed.

Status:Fixed» Closed (fixed)

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

Issue summary:View changes

correcting typos...