Posted by cedwards.rei on April 6, 2011 at 8:43pm
4 followers
Jump to:
| Project: | Views |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
in includes/handlers.inc line 1113 :
<?php
elseif ($GLOBALS['db_type'] == 'mysqli' || version_compare(mysql_get_server_info(), '4.1.3', '>=')) {
?>If you do not have the mysql extension enabled then using mysql_get_server_info() will result in a fatal error.
Perhaps the following would be a solution. Starting at line 1110 :
<?php
if ($GLOBALS['db_type'] == 'pgsql') {
db_query("SET TIME ZONE INTERVAL '$offset' HOUR TO MINUTE");
}
elseif ($GLOBALS['db_type'] == 'mysqli') {
db_query("SET @@session.time_zone = '$offset'");
}
elseif ($GLOBALS['db_type'] == 'mysql' && version_compare(db_version(), '4.1.3', '>=')) {
db_query("SET @@session.time_zone = '$offset'");
}
?>I don't know enough about the functionality to propose a proper patch.
Additionally, though only a potential issue with Pressflow or Drupal 7 and in a multi-database setup, knowing which db resource to compare could be required.
Thanks.
Comments
#1
db_version sounds like a good plan.
Can you fill a patch for it?
#2
Commited to both 6.x-2.x and 6.x-3.x
#3
Automatically closed -- issue fixed for 2 weeks with no activity.
#4
This commit is causing notices because the committed code uses db_version not db_version()
#5
Pushed a fix.
#6
So this is fixed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.