Skip to content
Permalink
Browse files

Getting Error while install of Open Web Analytics 1.6.4 (#438)

Hi,

i am getting error while install of ``Open Web Analytics`` 1.6.4

```
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in plugins/db/owa_db_mysql.php on line 220

Fatal error: Using $this when not in object context in owa_lib.php on line 1012
```

after debug i found

```php
	/**
	 * Simple Password Encryption
	 *
	 * @param string $password
	 * @return string
	 */
	public static function encryptOldPassword($password) {
		
		return md5(strtolower($password).strlen($password));
		//return owa_coreAPI::saltedHash( $password, 'auth');
	}
	public static function encryptPassword($password) {
		
		// check function exists to support older PHP
		if ( function_exists(password_hash) ) {
			return password_hash( $password, PASSWORD_DEFAULT );
		} else {
			return $this->encryptOldPassword($password);
		}
	}
```
you calling ``encryptOldPassword`` static function with $this

#437
  • Loading branch information
GaneshKandu authored and padams committed Jan 9, 2020
1 parent 6af87ee commit 2965d173e040bcf769a64c56ee4e6f8b6081fdda
Showing with 1 addition and 1 deletion.
  1. +1 −1 owa_lib.php
@@ -1009,7 +1009,7 @@ public static function encryptPassword($password) {
if ( function_exists(password_hash) ) {
return password_hash( $password, PASSWORD_DEFAULT );
} else {
return $this->encryptOldPassword($password);
return self::encryptOldPassword($password);
}
}

0 comments on commit 2965d17

Please sign in to comment.
You can’t perform that action at this time.