Doc #79597 [Csd]: Error in openssl-random-pseudo-bytes Example #1
| From: | cmb@php.net | Date: | Sun, 17 May 2020 11:02:30 +0000 |
| Subject: | Doc #79597 [Csd]: Error in openssl-random-pseudo-bytes Example #1 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17588@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79597&edit=1
ID: 79597
Updated by: cmb@php.net
Reported by: software_onbekend at hotmail dot com
Summary: Error in openssl-random-pseudo-bytes Example #1
Status: Closed
Type: Documentation Problem
Package: OpenSSL related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
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.
Previous Comments:
------------------------------------------------------------------------
[2020-05-17 11:02:12] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=78aa9e47fa0d18686db103a4362f41855b3b0511
Log: Fix #79597: Error in openssl-random-pseudo-bytes Example #1
------------------------------------------------------------------------
[2020-05-14 17:11:13] cmb@php.net
Indeed, the example makes no sense; if $length <= 0, the function
returns FALSE.
------------------------------------------------------------------------
[2020-05-14 17:00:24] software_onbekend at hotmail dot com
Description:
------------
---
From manual page: https://php.net/function.openssl-random-pseudo-bytes
---
The iterator in Example #1 start with the value -1
This gives an error: Fatal error: Uncaught Error: Length must be greater than 0.
Removing the minus sign solves the issue.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79597&edit=1