php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70487 pack('x') produces an error
Submitted: 2015-09-14 09:04 UTC Modified: 2015-09-14 12:35 UTC
From: norbert at linuxnetworks dot de Assigned: nikic (profile)
Status: Closed Package: Strings related
PHP Version: 7.0.0RC2 OS: Ubuntu 14.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: norbert at linuxnetworks dot de
New email:
PHP Version: OS:

 

 [2015-09-14 09:04 UTC] norbert at linuxnetworks dot de
Description:
------------
Due to a recent change, pack('x') generates the following error in 7.0 only:

pack() expects at least 2 parameters, 1 given

Changing it to pack('x', null) generates another error:

Unused parameter


Test script:
---------------
<?php

echo pack('x');
echo pack('x', null);

Expected result:
----------------
A NULL byte


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-14 09:37 UTC] laruence@php.net
-Type: Bug +Type: Documentation Problem
 [2015-09-14 09:37 UTC] laruence@php.net
change to document issue
 [2015-09-14 12:35 UTC] nikic@php.net
-Assigned To: +Assigned To: nikic
 [2015-09-14 13:04 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ab74d802473c10c9f9a61f75ba6443de9a958e4b
Log: Fix bug #70487
 [2015-09-14 13:05 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2015-09-15 12:13 UTC] ab@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ab74d802473c10c9f9a61f75ba6443de9a958e4b
Log: Fix bug #70487
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ab74d802473c10c9f9a61f75ba6443de9a958e4b
Log: Fix bug #70487
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC