WordPress Trac: Ticket #13657: When WP_DEBUG is true show better errors for establishing database connectionhttps://core.trac.wordpress.org/ticket/13657
<p>
Right now no matter if WP_DEBUG is enabled or not we always show some generic errors for Error establishing a database connection
</p>
<p>
We should display the specific error when WP_DEBUG is enabled.
</p>
en-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/ticket/13657
Trac 1.0.1sivelMon, 31 May 2010 16:27:14 GMThttps://core.trac.wordpress.org/ticket/13657#comment:1
https://core.trac.wordpress.org/ticket/13657#comment:1
<p>
Patch is just an idea of how we might do this. Open to other suggestions and patches.
</p>
TicketsivelMon, 31 May 2010 16:30:49 GMTattachment sethttps://core.trac.wordpress.org/ticket/13657
https://core.trac.wordpress.org/ticket/13657
<ul>
<li><strong>attachment</strong>
set to <em>13657.diff</em>
</li>
</ul>
TicketnacinMon, 21 Jun 2010 05:29:20 GMThttps://core.trac.wordpress.org/ticket/13657#comment:2
https://core.trac.wordpress.org/ticket/13657#comment:2
<p>
I would tend to think we should not be exposing the output of mysql_error() on any site. Or, if we do, then we at least also check for display_errors/WP_DEBUG_DISPLAY, in case they want WP_DEBUG (as can be common in production) but are logging it.
</p>
TicketnacinMon, 21 Jun 2010 05:29:28 GMTkeywords changedhttps://core.trac.wordpress.org/ticket/13657#comment:3
https://core.trac.wordpress.org/ticket/13657#comment:3
<ul>
<li><strong>keywords</strong>
<em>early</em> removed
</li>
</ul>
TicketnacinThu, 28 Oct 2010 11:03:06 GMTmilestone changedhttps://core.trac.wordpress.org/ticket/13657#comment:4
https://core.trac.wordpress.org/ticket/13657#comment:4
<ul>
<li><strong>milestone</strong>
changed from <em>Awaiting Triage</em> to <em>Future Release</em>
</li>
</ul>
TicketsivelWed, 17 Nov 2010 00:35:48 GMThttps://core.trac.wordpress.org/ticket/13657#comment:5
https://core.trac.wordpress.org/ticket/13657#comment:5
<p>
The way that translations are handled for these errors makes it difficult to do conditionals like this. Mainly due to duplicating large portions of code and strings. Well maybe not large but more than I am comfortable with duplicating.
</p>
<p>
I may just need to stare at the code for a bit to get a creative solution, that is unless someone has recommendations.
</p>
TicketmbijonSun, 30 Dec 2012 09:35:09 GMTcc changedhttps://core.trac.wordpress.org/ticket/13657#comment:6
https://core.trac.wordpress.org/ticket/13657#comment:6
<ul>
<li><strong>cc</strong>
<em>mike@…</em> added
</li>
</ul>
TicketryanFri, 11 Jul 2014 13:22:14 GMTstatus changed; owner deletedhttps://core.trac.wordpress.org/ticket/13657#comment:7
https://core.trac.wordpress.org/ticket/13657#comment:7
<ul>
<li><strong>owner</strong>
<em>ryan</em> deleted
</li>
<li><strong>status</strong>
changed from <em>new</em> to <em>assigned</em>
</li>
</ul>
Ticketchriscct7Sun, 01 Nov 2015 14:51:33 GMTkeywords changedhttps://core.trac.wordpress.org/ticket/13657#comment:8
https://core.trac.wordpress.org/ticket/13657#comment:8
<ul>
<li><strong>keywords</strong>
<em>dev-feedback</em> added
</li>
</ul>
TicketpentoMon, 02 Nov 2015 00:47:48 GMTkeywords changedhttps://core.trac.wordpress.org/ticket/13657#comment:9
https://core.trac.wordpress.org/ticket/13657#comment:9
<ul>
<li><strong>keywords</strong>
<em>needs-refresh</em> added; <em>dev-feedback</em> removed
</li>
</ul>
<p>
The strings have since been split up, making it much easier to insert a conditional string when <tt>WP_DEBUG</tt> and <tt>WP_DEBUG_DISPLAY</tt> are defined.
</p>
Ticket