[php-src] Issue #8120: mysqli blank error
| From: | kamil-tekiela | Date: | Mon, 21 Feb 2022 23:10:12 +0000 |
| Subject: | [php-src] Issue #8120: mysqli blank error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239950@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8120
Comment Author: kamil-tekiela
1. You should never have error reporting turned off in production. You should have
display_errors = 0 in production and you should log the errors instead.
2. You misidentified the error. It does not come from the code you posted. If you check the full
error message you will see that the message is pointing to one of the mysqli functions.
3. In PHP 8.1 the default error reporting mode in mysqli changed from silent to exceptions. This is
why you haven't seen the error before, you were silencing them all. The error was always there.
4. Retrieving just the last line of the output is not going to help you identify problems.
exec has the out-parameter called $output. Use that.