Fix PHP 8.1 E_DEPRECATED issue when the page has no output.
PDO driver always throw exceptions on failed queries for develop mode * better fix to https://github.com/pocketarc/codeigniter/commit/88889169b89c1042adecde00509cd4d1431b6c25 that assumes alwasy in developer mode this co0udl leave a disgustin render in production
... | ... | @@ -456,7 +456,7 @@ class CI_Output { |
456 | 456 | |
457 | 457 | $elapsed = $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end');
|
458 | 458 | |
459 | - if ($this->parse_exec_vars === TRUE)
|
|
459 | + if ($this->parse_exec_vars === TRUE && !empty($output))
|
|
460 | 460 | {
|
461 | 461 | $memory = round(memory_get_usage() / 1024 / 1024, 2).'MB';
|
462 | 462 | $output = str_replace(array('{elapsed_time}', '{memory_usage}'), array($elapsed, $memory), $output);
|
... | ... | @@ -65,7 +65,9 @@ class CI_DB_pdo_driver extends CI_DB { |
65 | 65 | *
|
66 | 66 | * @var array
|
67 | 67 | */
|
68 | - public $options = array();
|
|
68 | + public $options = array(
|
|
69 | + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
70 | + );
|
|
69 | 71 | |
70 | 72 | // --------------------------------------------------------------------
|
71 | 73 |
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help