summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-03 06:48:03 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-06-03 06:48:03 +0000
commitf106ce0683c593a6cee40d056809dee10399a234 (patch)
tree34773385e38a74ba60a733b16eb25e0a44de444e
parent843d942fbcba7345505b2cea74ad2e4e84509cc1 (diff)
downloadampache-f106ce0683c593a6cee40d056809dee10399a234.tar.gz
ampache-f106ce0683c593a6cee40d056809dee10399a234.tar.bz2
ampache-f106ce0683c593a6cee40d056809dee10399a234.zip
correct an error if you select an invalid object for the shoutbox
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/shoutbox.class.php2
-rw-r--r--shout.php6
3 files changed, 9 insertions, 1 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 73ae0bbb..658954a1 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.5-Alpha1
+ - Fix an error if you try to add a shoutbox for an invalid object
+ (Thx atrophic)
- Fixed issue with art dump on jpeg files (Thx atrophic)
- Fixed issue with force http play and port not correctly specifying
non-standard http port (Thx Deathcrow)
diff --git a/lib/class/shoutbox.class.php b/lib/class/shoutbox.class.php
index 9e4eafd6..d8db9a36 100644
--- a/lib/class/shoutbox.class.php
+++ b/lib/class/shoutbox.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
diff --git a/shout.php b/shout.php
index 77b5d119..1a9b2d15 100644
--- a/shout.php
+++ b/shout.php
@@ -37,6 +37,12 @@ switch ($_REQUEST['action']) {
// Get our object first
$object = shoutBox::get_object($_REQUEST['type'],$_REQUEST['id']);
+ if (!$object->id) {
+ Error::add('general',_('Invalid Object Selected'));
+ Error::display('general');
+ break;
+ }
+
// Now go ahead and display the page where we let them add a comment etc
require_once Config::get('prefix') . '/templates/show_add_shout.inc.php';
break;