Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Controller_REST returns Recoverable Error when CSV
  • I have created a API with Controller_REST. 

    XML and JSON response work fine but CSV fails with the following error.

    Runtime Recoverable error!
    Fuel\Core\PhpErrorException [ Runtime Recoverable error ]:
    Object of class .... could not be converted to string

    COREPATH/classes/format.php @ line 238

    238                    $item $enclosure.str_replace($enclosure$escape.$enclosure$item).$enclosure;
    239                }
    240                return $item;
    241            }, $items));
    242        };

    I thought CSV conversion works pretty much out of the box.
    In fact XML and JSON are both fine. What am I missing?


  • HarroHarro
    Accepted Answer
    Not enough information I'm afraid, I don't know what you pass to it. From the looks of it you try to return an object or objects, and not an array, which is the required return type for Controller_Rest.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion