Not sure if you've seen this before, but I couldn't find anything exactly the same on google. I'm using this library along with the Plist server for Drupal to interface with an iOS app. I get the following error upon any HTTP request I make:
```unpack() [function.unpack]: Type x: not enough input, need 1, have 0 in
/path/to/CFBinaryPropertyList.php on line 467.
I'm using PHP 5.3.5 on an Apache server with Drupal 6. This very well could be the Plist Server modules fault. But the Error is coming from your file, so I thought I would ask you first. The plist server module can be found here: http://drupal.org/project/plist_server. Thanks for the help.
Do you have some sample input?
Are you using the latest git checkout of CFPropertyList? If no, can you try it?
I did update to the latest git checkout, with the same error. I'm actually thinking this is a problem with the Drupal Plist Server module. It wasn't providing good enough error handling, and it was passing your parseBinaryString method an empty string. I'm going to open an issue with the module. Thanks for the help!
Well, if we don't reject working on an empty string our error handling is poor, too :-)
Rod, we should throw an exception in this case, shouldn't we?
OK, I implemented some additional tests on the input. Now it should throw an exception on invalid data
Most helpful comment
OK, I implemented some additional tests on the input. Now it should throw an exception on invalid data