cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

Fatal error: Undefined class constant 'HYDRATION_ARRAYS'

Open Nano-GG opened this issue 13 years ago • 2 comments

Hello,

Phalconphp ver 0.9.

I'm not sure if this is bug, i'm doing something wrong or did I misunderstand the guide :/

In a VoteController.php i have this:

<?php

use Phalcon\Mvc\Model\Resultset;

class VoteController extends BaseController
{
    public function voteAction($id = 0)
    {
        //init our vote sites
        $this->votesites = Vote::find(array(
            "hydration" => Resultset::HYDRATION_ARRAYS
            ));

        if ($this->votesites)
        {
.........

In the execution, i have this error: "Fatal error: Undefined class constant 'HYDRATION_ARRAYS'"

Thanks for your support. :+1:

Nano-GG avatar Feb 15 '13 16:02 Nano-GG

Hi, it seems the docs are wrong, it must be HYDRATE_ARRAYS

ghost avatar Feb 15 '13 17:02 ghost

Thanks @phalcon Yes, the problem is in the docs.

Nano-GG avatar Feb 16 '13 18:02 Nano-GG