Last modified: 2008-03-22 00:09:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6892 - Database error + PHP Undefined index notice on trackback.php on bad input + E_ALL
Database error + PHP Undefined index notice on trackback.php on bad input + E...
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: 6891 (view as bug list)
Depends on: 7147
  Show dependency treegraph
Reported: 2006-08-01 07:37 UTC by Nick Jenkins
Modified: 2008-03-22 00:09 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Nick Jenkins 2006-08-01 07:37:31 UTC
CURL command:
curl --silent --include \
 -F 'url'='title'\
 -F 'blog_name'='80'\
 -F 'article'='Main Page'\
 -F 'excerpt'='"'\

LocalSettings.php includes this: 
$wgUseTrackbacks = true;
error_reporting (E_ALL); 
$wgShowSQLErrors = true;
(i.e. stricter error reporting, trackbacks usage enabled, and show details of
failed SQL queries).

HTML output contains:
<br />
<b>Notice</b>:  Undefined index:  title in
<b>/var/www/hosts/mediawiki/phase3/trackback.php</b> on line <b>46</b><br />
                <title>Database error</title>
                <h1><img src='/wiki/skins/common/images/wiki.png'
style='float:left;margin-right:1em' alt=''>Database error</h1>
                A database query syntax error has occurred.
This may indicate a bug in the software.
The last attempted database query was:
<blockquote><tt>INSERT  INTO `trackbacks`
(tb_page,tb_title,tb_url,tb_ex,tb_name) VALUES
from within function "<tt>Database::insert</tt>".
MySQL returned error "<tt>1048: Column 'tb_title' cannot be null
Comment 1 Kkkdc @jawiki 2006-08-28 09:54:14 UTC
*** Bug 6891 has been marked as a duplicate of this bug. ***
Comment 2 Kkkdc @jawiki 2006-08-28 09:58:58 UTC
I expect replace "(untitled)" with wfMsg().

Index: trackback.php
--- trackback.php	(rev. 16138)
+++ trackback.php	(copied)
@@ -43,8 +43,8 @@
 $dbw =& wfGetDB(DB_MASTER);
-$tbtitle = $_POST['title'];
-$tbex = $_POST['excerpt'];
+$tbtitle = isset($_POST['title']) ? $_POST['title'] : "(untitled)";
+$tbex = isset($_POST['excerpt']) ? $_POST['excerpt'] : "";
 $tburl = $_POST['url'];
 $tbname = $_POST['blog_name'];
 $tbarticle = $_REQUEST['article'];
 $tbname = $_POST['blog_name'];
 $tbarticle = $_REQUEST['article'];
Comment 3 Brion Vibber 2008-03-22 00:09:05 UTC
Fixed in r32318

Note You need to log in before you can comment on or make changes to this bug.