Ticket #1023 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

"Trying to get property of non-object" in DA_Navigation

Reported by: remyhonig Assigned to: demian
Priority: normal Milestone: 0.6.0
Component: module - navigation Severity: not categorised
Keywords: Cc:

Description

This code in modules/navigation/classes/DA_Navigation.php (rev 2119) causes an error when there are no aliases found for $id.

    function getAliasBySectionId($id)
    {
        $query = "
            SELECT uri_alias
            FROM {$this->conf['table']['uri_alias']}
            WHERE section_id = $id";
        $result = $this->dbh->limitQuery($query,0,1);
        $row =& $result->fetchRow();
        $result = (is_object($row)) ? $row->uri_alias : false;
        return $result;
    }

Attachments

uri_alias.diff (0.6 kB) - added by remyhonig on 06/19/06 21:14:27.

Change History

06/19/06 21:14:27 changed by remyhonig

  • attachment uri_alias.diff added.

06/19/06 21:16:42 changed by remyhonig

Oops excuse me, in the ticket i posted the function after editing. See the attached diff for the code that generated the error.

06/20/06 04:27:49 changed by demian

  • owner changed from somebody to demian.
  • status changed from new to assigned.

hehe, this method was changed recently to be compatible with oracle, i guess not enough testing. thanks for your patch, i will check it out.

cheers

demian

06/20/06 13:18:11 changed by demian

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [2160]) applied url_alias patch, fixes #1023