Development

#2542 (The permaLink example code in the tutorial does not correctly detect non-existent titles)

You must first sign up to be able to contribute.

Ticket #2542 (closed documentation: fixed)

Opened 1 year ago

Last modified 1 year ago

The permaLink example code in the tutorial does not correctly detect non-existent titles

Reported by: georgsorst Assigned to: fabien
Priority: minor Milestone:
Component: other Version: 1.0.0
Keywords: tutorial Cc:
Qualification: Unreviewed

Description

The executePermaLink() function as listed in the tutorial has a minor error. It will always show the "last" post if no other post matches the stripped title since the last post will remain in the $post variable once the foreach loop is done. Instead, it should show an error page since no matching post was found.

An improved version that fixes this bug is attached.

Attachments

actions.class.php (437 bytes) - added by georgsorst on 11/15/07 13:18:26.
Fixed executePermaLink function

Change History

11/15/07 13:18:26 changed by georgsorst

  • attachment actions.class.php added.

Fixed executePermaLink function

12/27/07 16:09:08 changed by fabien

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

in r6759 and r6760