getgrav/grav · error · RuntimeException

Password hashing failed: no password provided.

Error message

Password hashing failed: no password provided.

What it means

Error "Password hashing failed: no password provided." thrown in getgrav/grav.

Source

Thrown at system/src/Grav/Common/User/Authentication.php:31

/**
 * Class Authentication
 * @package Grav\Common\User
 */
abstract class Authentication
{
    /**
     * Create password hash from plaintext password.
     *
     * @param string $password Plaintext password.
     *
     * @throws RuntimeException
     * @return string
     */
    public static function create($password): string
    {
        if (!$password) {
            throw new RuntimeException('Password hashing failed: no password provided.');
        }

        $hash = password_hash($password, PASSWORD_DEFAULT);

        if (!$hash) {
            throw new RuntimeException('Password hashing failed: internal error.');
        }

        return $hash;
    }

    /**
     * Verifies that a password matches a hash.
     *
     * @param string $password Plaintext password.
     * @param string $hash     Hash to verify against.
     *
     * @return int              Returns 0 if the check fails, 1 if password matches, 2 if hash needs to be updated.

View on GitHub (pinned to 6040efed04)

When it happens

Trigger: Thrown at system/src/Grav/Common/User/Authentication.php:31 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17). Data as JSON: /api/errors/170a82fb12ab89e4. Report an issue: GitHub.