Skip to content

Loading…

Fix problem with MySQL connections not being closed properly #948

Closed
wants to merge 1 commit into from

1 participant

@iansgoldstein

Correct the syntax for the PHP is_callable() function in the JDatabaseDriverMysqli destructor method to ensure that MySQL connections are properly closed.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29916

@iansgoldstein iansgoldstein Update mysqli.php
Correct the syntax for the PHP is_callable() function in the JDatabaseDriverMysqli destructor method to ensure that MySQL connections are properly closed.
20a07c8
@mbabker mbabker closed this in 1e00890
@garyamort garyamort pushed a commit to garyamort/joomla-cms that referenced this pull request
@iansgoldstein iansgoldstein [#29916] MySQL connections are not closed (Fix #948) b9a43f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2013
  1. @iansgoldstein

    Update mysqli.php

    iansgoldstein committed
    Correct the syntax for the PHP is_callable() function in the JDatabaseDriverMysqli destructor method to ensure that MySQL connections are properly closed.
Showing with 1 addition and 1 deletion.
  1. +1 −1 libraries/joomla/database/driver/mysqli.php
View
2 libraries/joomla/database/driver/mysqli.php
@@ -82,7 +82,7 @@ public function __construct($options)
*/
public function __destruct()
{
- if (is_callable($this->connection, 'close'))
+ if (is_callable(array($this->connection, 'close')))
{
mysqli_close($this->connection);
}
Something went wrong with that request. Please try again.