php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79597 Error in openssl-random-pseudo-bytes Example #1
Submitted: 2020-05-14 17:00 UTC Modified: 2020-05-17 11:02 UTC
From: software_onbekend at hotmail dot com Assigned: cmb (profile)
Status: Closed Package: OpenSSL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: software_onbekend at hotmail dot com
New email:
PHP Version: OS:

 

 [2020-05-14 17:00 UTC] 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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-14 17:11 UTC] cmb@php.net
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem -Package: Website problem +Package: OpenSSL related
 [2020-05-14 17:11 UTC] cmb@php.net
Indeed, the example makes no sense; if $length <= 0, the function
returns FALSE.
 [2020-05-17 11:02 UTC] 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-17 11:02 UTC] phpdocbot@php.net
-Status: Verified +Status: Closed
 [2020-05-17 11:02 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-05-17 11:02 UTC] cmb@php.net
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.
 [2020-05-18 04:50 UTC] phpdocbot@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=0bc396cd335fabd634a5b310b58467bc6d1ed87e
Log: Fix #79597: Error in openssl-random-pseudo-bytes Example #1
 [2020-12-30 11:59 UTC] nikic@php.net
Automatic comment on behalf of mumumu
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=29def2439fe460234f573d7e4da176eb4fff2f96
Log: Fix #79597: Error in openssl-random-pseudo-bytes Example #1
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC