From fe915601a150502c2561628148ec318cf738f1fa Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 25 Dec 2012 20:44:32 +0200 Subject: Additional bug fix from John Haque. --- ext.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext.c') diff --git a/ext.c b/ext.c index f3e783da..bb090d0f 100644 --- a/ext.c +++ b/ext.c @@ -229,8 +229,15 @@ get_argument(int i) t = GET_PARAM(i); - if (t->type == Node_array_ref) + if (t->type == Node_array_ref) { + if (t->orig_array->type == Node_var) { + /* already a scalar, can no longer use it as array */ + t->type = Node_var; + t->var_value = Nnull_string; + return t; + } return t->orig_array; /* Node_var_new or Node_var_array */ + } if (t->type == Node_var_new || t->type == Node_var_array) return t; return t->var_value; -- cgit v1.2.3