-
Notifications
You must be signed in to change notification settings - Fork 291
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
Undefined constant "Kint\Renderer\STDOUT" in 4.1 #379
Comments
Hi @kenjis I wasn't aware there was any context where @DRSDavidSoft Just to be sure, can you take a look and make sure it still works on windows? (There shouldn't have been any change logic-wise) |
@jnvsor Will do soon; I wasn't aware that Sad thing that this meant the one liner to check Also, maybe you can make use of I'll test the CLI output on Windows as soon as possible. |
@jnvsor what about if you just import the constant instead? I mean like this: namespace Kint\Renderer;
use Exception;
use Kint\Zval\Value;
use Throwable;
use const STDOUT;
class CliRenderer extends TextRenderer
{ ... |
@kktsvetkov Constants are like functions, if it can't find it in the current namespace it checks the global. Turns out his @kenjis I couldn't reproduce this with my own @DRSDavidSoft Great |
@jnvsor The documentation says that
So actually I thought I think if ( !is_defined('STDOUT') ) define('STDOUT', fopen('php://stdout', 'w')); Sorry that #319 caused this bit of additional trouble, hopefully everything works correctly now! Thanks for the work you do ❤️ |
That's the thing they are defined everywhere - at least normally. In apache it's also defined by default because that's how the page output gets from PHP to the webserver (And I assume in nginx too) Edit: Apparently I'm getting mixed up. I guess that's how it sometimes outputs to the webserver (In CGI mode instead of apache module?) but not currently on my system. Long story short it's usually defined :) |
I confirmed 4.1.1 fixed the error. |
Great |
In this case, Windows Apache does not have |
What happened?
How to reproduce:
test.php
:The text was updated successfully, but these errors were encountered: