Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error while install of Open Web Analytics 1.6.4 #438

Merged
merged 1 commit into from Jan 9, 2020

Conversation

@GaneshKandu
Copy link
Contributor

GaneshKandu commented Jan 8, 2020

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

	/**
	 * 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

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
Copy link
Owner

padams left a comment

Nice catch.

@padams padams merged commit 2965d17 into padams:master Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.