When specifying a non-existent database for connection I'm getting a number of PHP Warnings:

Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in /Users/mcarter/Sites/drupal-5.0/includes/database.mysql.inc on line 396

Warning: mysql_real_escape_string() expects parameter 2 to be resource, null given in /Users/mcarter/Sites/drupal-5.0/includes/database.mysql.inc on line 396

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Users/mcarter/Sites/drupal-5.0/includes/database.mysql.inc on line 148

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /Users/mcarter/Sites/drupal-5.0/includes/database.mysql.inc on line 163
CommentFileSizeAuthor
#5 t_m_p_r_d_g_c1.07 KBchx
#1 93079.patch.txt616 bytesdopry
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dopry’s picture

Version: 5.0-beta1 » 5.x-dev
Priority: Minor » Critical
Status: Active » Needs review
FileSize
616 bytes

another duplicate of http://drupal.org/node/99030, however I do get a calling undefined functino file_directory_path now.... Thats fixed by the attached patch.

It seems there are times when drupal_get_css calls file directory path before we've loaded file.inc, after the new css preprocessor landed.

ChrisKennedy’s picture

Can you give more description of how you're getting this error? I don't have a way to verify the patch otherwise.

Steven’s picture

I think this is for the maintenance pages. We need to avoid using the css preprocessor there.

Dries’s picture

Status: Needs review » Needs work

theme_maintenaince_page() calls drupal_add_css('misc/maintenance.css', 'module', 'all', FALSE) and gets it again with drupal_get_css();

If modules (or configuration settings) can't tab into that, we might be able to shortcut these calls per Steven's suggestion.

Needs to be investigated. :)

chx’s picture

Status: Needs work » Needs review
FileSize
1.07 KB
Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)