Unable to redefine functions which return by reference, not value #12

Closed
redconfetti opened this Issue Apr 23, 2011 · 1 comment

Comments

Projects
None yet
2 participants

I'm trying to use this extension with a Wordpress plugin which over-rides native Wordpress functionality which cannot be over-rode using a Drop-In plugin.

Wordpress functions appear to often return references instead of values such as 'function &get_pages($args = '')'. I cannot use 'runkit_function_redefine' to redefine such a function.

zenovich added a commit that referenced this issue Sep 17, 2012

Adding and redefining functions and methods, which return references,…
… were fully implemented (#12).

New optional argument 'return_ref' of functions runkit_function_add and runkit_function_redefine was introduced.
New constant RUNKIT_ACC_RETURN_REFERENCE was introduced for use with functions runkit_method_add and runkit_method_redefine.
New tests were added.
Owner

zenovich commented Sep 17, 2012

Sorry for the huge delay.
Thanks for your feature-request. Please, check out the latest version of the master branch.

tony2001 added a commit to tony2001/runkit that referenced this issue Sep 18, 2012

Merge git://github.com/zenovich/runkit
* git://github.com/zenovich/runkit:
  Adding and redefining functions and methods, which return references, were fully implemented (#12). New optional argument 'return_ref' of functions runkit_function_add and runkit_function_redefine was introduced. New constant RUNKIT_ACC_RETURN_REFERENCE was introduced for use with functions runkit_method_add and runkit_method_redefine. New tests were added.
  The possible crash on manipulating constants having length less than two characters was eliminated. Functions manipulating constants were corrected to work in PHP5.4, new tests were added.
  All ways of adding and removing magic methods and old-style constructors were reworked and corrected (issue #35). Magic methods __isset, __unset, __callStatic, and __toString are now supported. Functions runkit_class_adopt & runkit_class_emancipate now change class-hierarchy (issue #13). tony2001's patch d63c984 was applied and reworked. New tests were added.
  functions and methods redefining in PHP 5.4 was corrected in all places, new tests were added (#36, #32)
  a fix was added to package.xml
  mad casing of classnames in different versions of PHP
  compilation bug (gcc 4.3+) with definition of internal function was fixed

@zenovich zenovich closed this Sep 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment