Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
redconfetti opened this Issue · 1 comment

2 participants

@redconfetti

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 zenovich referenced this issue from a commit
@zenovich 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.
159306b
@zenovich
Owner

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

@tony2001 tony2001 referenced this issue from a commit in tony2001/runkit
@tony2001 tony2001 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
3c35dda
@zenovich zenovich closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.