php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #26763 unserialize() callback does not work
Submitted: 2004-01-01 22:58 UTC Modified: 2004-01-02 11:23 UTC
From: krenya at inf dot bme dot hu Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.4 OS: WinXP Professional SP1
Private report: No CVE-ID: None
 [2004-01-01 22:58 UTC] krenya at inf dot bme dot hu
Description:
------------
The docs say:
  mixed unserialize ( string str [, string callback])
  Note: The callback parameter was added in PHP 4.2.0

But if I make a call with 2 parameters, I get this:
  Warning: Wrong parameter count for unserialize()...

The unserialize_callback_func directive using ini_set() does not do anything as I get _PHP_Inclomplete_Class-es everywhere.

I also tried it with a 4.3.1 Linux CGI but it's the same...

Is this feature really implemented?

Thanx.


Reproduce code:
---------------
$x = unserialize('O:1:"a":1:{s:5:"value";s:3:"100";}', 'dynamic_loader');



Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-02 11:12 UTC] sniper@php.net
There has never been such parameter for unserialize() function.
You're supposed to use the php.ini option 'unserialize_callback_func'  by setting it either in .htacces, with ini_set() or in php.ini.

Reclassified as documentation problem.

 [2004-01-02 11:23 UTC] vrana@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Aug 16 16:01:28 2024 UTC