This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-02-19 12:47:43 -04:00
parent 04d4cefa24
commit df4676daf1
3 changed files with 18 additions and 4 deletions

View File

@@ -98,7 +98,9 @@ class MySQLiResultSet extends ResultSetCommon implements ResultSet {
*/
public function close()
{
if (is_resource($this->result)) {
@mysqli_free_result($this->result);
}
$this->fields = array();
}

View File

@@ -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,8 +908,10 @@ class DB_mysqli extends DB_common
// free the result only if we were called on a table
if ($got_string) {
if (is_resource($id)) {
@mysqli_free_result($id);
}
}
return $res;
}

View File

@@ -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);
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']