Doc #75276 [Opn->Csd]: password_hash docs have \n that causes confusion
| From: | salathe@php.net | Date: | Thu, 28 Sep 2017 15:28:54 +0000 |
| Subject: | Doc #75276 [Opn->Csd]: password_hash docs have \n that causes confusion | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15007@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75276&edit=1
ID: 75276
Updated by: salathe@php.net
Reported by: chris at sternal-johnson dot com
Summary: password_hash docs have \n that causes confusion
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
The examples are inspired by an example on the crypt() page [1], where adding newlines made more
sense due to the example outputting multiple lines.
For the sake of others who might fall in to the "should I include newlines when using
password_hash()?" trap... I've taken them away from the examples on the password_hash()
page.
Thanks for the bug report.
[1] http://php.net/manual/en/function.crypt.php
Previous Comments:
------------------------------------------------------------------------
[2017-09-28 15:27:56] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=343154
Log: remove confusing newlines in password_hash() examples (doc bug #75276)
------------------------------------------------------------------------
[2017-09-28 15:27:54] peehaa@php.net
Can you submit you patch for review in the docs editor so I can commit it?
------------------------------------------------------------------------
[2017-09-28 15:06:12] chris at sternal-johnson dot com
Yes, it's a basic misunderstanding of PHP syntax. That said, in the comments, another high-rep
SO PHP user states "Yeah I know. I've been in conversation with a few members here about
it before." so it's more than one incident.
------------------------------------------------------------------------
[2017-09-28 14:54:23] peehaa@php.net
> This apparently causes some confusion to **users**
I only see a single instance of a confused user who lacks understanding of basic syntax.
Not sure whether this warrants the change tbh.
------------------------------------------------------------------------
[2017-09-28 14:49:47] chris at sternal-johnson dot com
Description:
------------
---
From manual page: http://www.php.net/function.password-hash
---
The password_hash documentation includes a code example with a \n character concatenated after the
hashed password.
echo password_hash("rasmuslerdorf", PASSWORD_DEFAULT)."\n";
This apparently causes some confusion to users, who think it's necessary.
https://stackoverflow.com/questions/46471880/php-function-to-use-password-hash-hash-or-md5-depending-on-availability
This example in the documentation would be just fine without the newline.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75276&edit=1