Jump to content
Larry Ullman's Book Forums

Erata Entry: Chapter 18, Script 18.10 Error

Recommended Posts


Just noticed the following code error for the


function used on page 626, line 34.

The code base shown in the book only passes 1 parameter,

// Incorrect number of parameters
$ph = password_hash($p);

This function requires 2 parameters as outlined in the PHP docks here: https://www.php.net/manual/en/function.password-hash.php

This should probably be: (unless you wish to us a differnet constant based on your own project needs)

$ph = password_hash($p, PASSWORD_DEFAULT);

Hope this will help someone learning that may have gotten stuck on this project.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...