Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to prevent PHP User Warning for a method that is not defined during its redefinition #23

Open
tomolimo opened this issue Mar 31, 2015 · 2 comments

Comments

@tomolimo
Copy link

Hello,

I'm doing a redefinition of a method that will be loaded later during execution.
All is fine, but depending on functionnal reasons the file is not always included (only needed classes are loaded), then when execution is finished, I got a PHP User Warning saying:

PHP User Warning: 'my_patched_function' was never defined during the lifetime of its redefinition in .....\patchwork\src\Interceptor.php at line 43

How is it be possible to disable such warnings?
Thank you,
regards,
Tomolimo

@antecedent
Copy link
Owner

Hello,
I will implement this today as Patchwork\silence($handle), where $handle is the return value of replace.

@antecedent
Copy link
Owner

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants