UUID

15 views
Skip to first unread message

William Oberman

unread,
Apr 9, 2014, 11:21:10 AM4/9/14
to phpc...@googlegroups.com
I'm not a master of dynamic PHP, but I *think* there was almost an infinite recursion bug in UUID.

__get("string") returns $this->__toString();
__toString() returns $this->string

But, the class is "saved" because in the constructor it saves $this->string with the comment "Optimize the most common use".

Seems like the optimization saves a mutual recursion? :-)

--
Will Oberman
Civic Science, Inc.
6101 Penn Avenue, Fifth Floor
Pittsburgh, PA 15206
(M) 412-480-7835
(E) obe...@civicscience.com

Tyler Hobbs

unread,
Apr 9, 2014, 1:00:11 PM4/9/14
to phpc...@googlegroups.com
That's fun :)

The "string" case can just be removed from the __get() switch.  Fixed here: https://github.com/thobbs/phpcassa/commit/6180fcbab631a6a360b39beca37117217e843bca


--
You received this message because you are subscribed to the Google Groups "phpcassa" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phpcassa+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tyler Hobbs
DataStax
Reply all
Reply to author
Forward
0 new messages