PMC-508
This commit is contained in:
@@ -98,7 +98,9 @@ class MySQLiResultSet extends ResultSetCommon implements ResultSet {
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
@mysqli_free_result($this->result);
|
||||
if (is_resource($this->result)) {
|
||||
@mysqli_free_result($this->result);
|
||||
}
|
||||
$this->fields = array();
|
||||
}
|
||||
|
||||
|
||||
12
thirdparty/pear/DB/mysqli.php
vendored
12
thirdparty/pear/DB/mysqli.php
vendored
@@ -379,7 +379,13 @@ class DB_mysqli extends DB_common
|
||||
# need to come up with different means for next line
|
||||
# since $result is object (int)$result won't fly...
|
||||
// unset($this->num_rows[(int)$result]);
|
||||
return @mysqli_free_result($result);
|
||||
|
||||
//for compatibility the method must return a boolean.
|
||||
if (is_resource($result)) {
|
||||
@mysqli_free_result($result);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// }}}
|
||||
@@ -902,7 +908,9 @@ class DB_mysqli extends DB_common
|
||||
|
||||
// free the result only if we were called on a table
|
||||
if ($got_string) {
|
||||
@mysqli_free_result($id);
|
||||
if (is_resource($id)) {
|
||||
@mysqli_free_result($id);
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -944,6 +944,8 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
|
||||
*
|
||||
* @param string resource path to check for locks
|
||||
* @return bool true on success
|
||||
* @link https://wiki.processmaker.com/index.php/WebDAV
|
||||
* @deprecated
|
||||
*/
|
||||
public function checkLock($path)
|
||||
{
|
||||
@@ -959,7 +961,9 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
|
||||
|
||||
if ($res) {
|
||||
$row = mysqli_fetch_array($res);
|
||||
mysqli_free_result($res);
|
||||
if (is_resource($res)) {
|
||||
mysqli_free_result($res);
|
||||
}
|
||||
|
||||
if ($row) {
|
||||
$result = array("type" => "write", "scope" => $row["exclusivelock"] ? "exclusive" : "shared", "depth" => 0, "owner" => $row['owner'], "token" => $row['token'], "expires" => $row['expires']
|
||||
|
||||
Reference in New Issue
Block a user