FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix Error: Uncaught TypeError: Argument 1 passed by kazimolmez · Pull Request #223 · ezSQL/ezsql · GitHub

/ ezsql Public

Fix Error: Uncaught TypeError: Argument 1 passed - #223

Merged
TheTechsTech merged 1 commit into
ezSQL:masterfrom
kazimolmez:patch-1
Apr 30, 2025
Merged

Fix Error: Uncaught TypeError: Argument 1 passed#223
TheTechsTech merged 1 commit into
ezSQL:masterfrom
kazimolmez:patch-1

Conversation

Copy link
Copy Markdown
Contributor

Code:

$data   = [
  'name'            => $_GET['name'],
  'fax'             => NULL,
  'updated_on'      => date('Y-m-d H:i:s'),
];
$db->update('restaurant', $data, ['id', '=', 12]);

Error:
Fatal error: Uncaught TypeError: Argument 1 passed to ezsql\Database\ez_pdo::escape() must be of the type string, null given, called in /var/www/vendor/ezsql/ezsql/lib/ezQuery.php on line 633 and defined in /var/www/vendor/ezsql/ezsql/lib/Database/ez_pdo.php:173 Stack trace: #0 /var/www/vendor/ezsql/ezsql/lib/ezQuery.php(633): ezsql\Database\ez_pdo->escape(NULL) #1 /var/www/ajax.php(478): ezsql\ezQuery->update('restaurant', Array, Array) #2 {main} thrown in /var/www/vendor/ezsql/ezsql/lib/Database/ez_pdo.php on line 173

Fix in error: Fatal error: Uncaught TypeError: Argument 1 passed to ezsql\Database\ez_pdo::escape() must be of the type string, null given, called in /var/www/vendor/ezsql/ezsql/lib/ezQuery.php on line 633 and defined in /var/www/vendor/ezsql/ezsql/lib/Database/ez_pdo.php:173 Stack trace: #0 /var/www/vendor/ezsql/ezsql/lib/ezQuery.php(633): ezsql\Database\ez_pdo->escape(NULL) #1 /var/www/ajax.php(478): ezsql\ezQuery->update('restaurant', Array, Array) #2 {main} thrown in /var/www/vendor/ezsql/ezsql/lib/Database/ez_pdo.php on line 173

Copy link
Copy Markdown
Contributor

What version PHP you using? Many bugs nowadays needs fixing on different versions, and the Github Actions CI.

Copy link
Copy Markdown
Contributor Author

What version PHP you using? Many bugs nowadays needs fixing on different versions, and the Github Actions CI.

PHP version: 7.4

TheTechsTech merged commit f21aeb5 into ezSQL:master Apr 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL