-
Notifications
You must be signed in to change notification settings - Fork 768
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
Notice: Use of undefined constant STDERR #173
Comments
@drupalroller thanks for reporting this. I'm assuming you're using this library in a web application right? I believe PHP only recognizes STDERR for CLI applications. We'll look into changing how the default logger is setup for this library. In the meantime you can setup your own logger when building an AW session to avoid this. |
Maybe path to log file could be specified in the config file and it could use that instead of just standard console output? |
@drupalroller using fopen('php://stderr', 'w') instead of the STDERR constants (which is only defined when running PHP in the CLI) should fix this, will make an update. @hakimio that's a good idea, will add that convenience feature, as you can always specify your own Monolog logger that writes to a file as well. |
I'm getting this error notice every time i use the library.
Notice: Use of undefined constant STDERR - assumed 'STDERR' in Google\AdsApi\AdWords\AdWordsSessionBuilder->defaultOptionals() (line 239 of ******/docroot/vendor/googleads/googleads-php-lib/src/Google/AdsApi/AdWords/AdWordsSessionBuilder.php).
The text was updated successfully, but these errors were encountered: