ee2-rest icon indicating copy to clipboard operation
ee2-rest copied to clipboard

Error in _force_array() function

Open arvinsim opened this issue 10 years ago • 0 comments

In a few of my pages, I am getting this error when I enable debug mode:

A PHP Error was encountered
Severity: Warning
Message: strtotime() expects parameter 1 to be string, array given
Filename: rest/pi.rest.php
Line Number: 351

The relevant part of the code in pi.rest.php is this:

// Format dates to unix timestamps
elseif (isset($this->EE->TMPL->date_vars[$index]) and ! is_numeric($child))
{
    $child = strtotime($child);
}

I've tried outputting the value of $child before the strtotime call, and I see:

array(1) { ["profile_name"]=> string(18) "John Doe" }

The output is the array representation of the JSON string I expect to be returned to me.

Any ideas what be causing my issues? I am using EE 2.8.1

arvinsim avatar Jun 23 '14 05:06 arvinsim