Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when unpack specifc data #2

Open
crazynds opened this issue Apr 1, 2024 · 0 comments
Open

Bug when unpack specifc data #2

crazynds opened this issue Apr 1, 2024 · 0 comments

Comments

@crazynds
Copy link

crazynds commented Apr 1, 2024

The following code throws an erro:

<?php

$this->bin = new Binn();
$data = $this->bin->serialize([
    [
        "Astrá",
        6,
    ]
]);
$this->bin->unserialize($data);

Error:

ErrorException {#2094 ▼ // vendor\knik\binn\src\BinnAbstract.php:457
  #message: "unpack(): Type C: not enough input values, need 1 values but only 0 were provided"
  #code: 0
  #file: "
C:\Users\Administrator\Desktop\workspace\PCare\vendor
\knik\binn\
src\BinnAbstract.php"
  #line: 454
  #severity: E_WARNING

The error disapear if:

  • If I remove the number in the end of the array
  • If I remove the string element
  • If I swap the order of the elements in array
  • If the array is only one deep
  • If I remove the character 'á'

If I add other elements to array in any order, the exception occurr in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant