diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-04-28 05:11:46 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-04-28 05:11:46 +0000 |
commit | e827e05429469912c450d2a1ee6750fffc82dbde (patch) | |
tree | f0d3af7ece4569d21491dbd3ac7901e0f41e3f84 /include/section_init.inc.php | |
parent | 1cc593f7606c34428271a4beee5755a301988e4e (diff) |
bug 349: Nicer display messages instead of "die" when urls cannot be
solved (also set 404 status code for bots)
git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1287 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r-- | include/section_init.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php index 3a27882ba..1d5949e63 100644 --- a/include/section_init.inc.php +++ b/include/section_init.inc.php @@ -197,7 +197,7 @@ SELECT name, url_name, id } if ( empty($page['tags']) ) { - die('Fatal: no existing tag'); + page_not_found('Requested tag does not exist', get_root_url().'tags.php' ); } } else if (0 === strpos($tokens[$next_token], 'fav')) @@ -316,6 +316,10 @@ if ('categories' == $page['section']) if (isset($page['category'])) { $result = get_cat_info($page['category']); + if (empty($result)) + { + page_not_found('Requested category does not exist' ); + } $page = array_merge( $page, |