Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

#30900 [Opn->Csd]: uniqid() warning when no argument
ID:               30900
Updated by:       vrana@php.net
Reported By:      phpbugs at mechintosh dot com
-Status:           Open
+Status:           Closed
Bug Type:         Documentation problem
Operating System: MacOS X 10.3.6
PHP Version:      4.3.9
New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php

Already fixed by Nuno in XML sources.


Previous Comments:
------------------------------------------------------------------------

[2004-11-26 02:09:26] phpbugs at mechintosh dot com

Description:
------------
http://nl.php.net/manual/en/function.uniqid.php

Excerpt, added arrows:
----------------------
string uniqid ( [string prefix [, bool more_entropy]])

uniqid() returns a prefixed unique identifier based on the current time
in microseconds. prefix is --> optional <-- but can be useful, for
instance, if you generate identifiers simultaneously on several hosts
that might happen to generate the identifier at the same microsecond.
Up until PHP 4.3.1, prefix could only be a maximum of 114 characters
long.

If the --> optional <-- more_entropy parameter is TRUE....
----------------------

So while both parameters should be optional, I do get a warning.

Reproduce code:
---------------
<?php
ini_set('display_errors', '1');
ini_set('track_errors', '1');
error_reporting(E_ALL);

echo uniqid();
?>

Expected result:
----------------
41a6819d003c2

or somesuch.. the same result that I would have gotten with
echo uniqid('');

Actual result:
--------------
Warning: uniqid() expects at least 1 parameter, 0 given in
/Library/WebServer/Documents/foo.php on line 7


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=30900&edit=1

Report this thread to moderator Post Follow-up to this message
Old Post
vrana@php.net
11-26-04 09:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Documentation archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:41 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.