note 126564 added to function.sha1
| From: | hritik dot elf at gmail dot com | Date: | Sat, 06 Nov 2021 21:53:37 +0000 |
| Subject: | note 126564 added to function.sha1 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217152@lists.php.net to get a copy of this message | ||
The return value is not always "sha1 hash as a string". Specially, the part about "as
a string" is not guaranteed if input is malformed.
Eg:
php > var_dump(sha1(array()));
PHP Warning: sha1() expects parameter 1 to be string, array given in php shell code on line 1
NULL
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 129.151.46.159)
----
Manual Page -- https://php.net/manual/en/function.sha1.php
Edit -- https://main.php.net/note/edit/126564
Del: integrated -- https://main.php.net/note/delete/126564/integrated
Del: useless -- https://main.php.net/note/delete/126564/useless
Del: bad code -- https://main.php.net/note/delete/126564/bad+code
Del: spam -- https://main.php.net/note/delete/126564/spam
Del: non-english -- https://main.php.net/note/delete/126564/non-english
Del: in docs -- https://main.php.net/note/delete/126564/in+docs
Del: other reasons-- https://main.php.net/note/delete/126564
Reject -- https://main.php.net/note/reject/126564
Search -- https://main.php.net/manage/user-notes.php