Glitch in tree function example in articles model of user guide

edited September 2011 in Bug Reports
The tree function example has a minor glitch, in that, if no categories exist, the admin tree display in the articles section will throw an error. This is because $cat_id will never be assigned a value by the preceding while loop.

Or was that intentional to keep us noobs on our toes?

See http://getfuelcms.com/user_guide/modules/tutorial#authors_model

Comments

  • edited 11:21AM
    Good catch. If you specify the following before the first loop, it works OK correct?
    $cat_id = -1;
  • edited 11:21AM
    I think I assigned 0 instead - but declaring a default, that solved it. Thanks! If I had rushed ahead and inserted some category data, I wouldn't have noticed.
Sign In or Register to comment.