[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] [pecl-database-mysql] master: Don't throw fatal error if class not found
From: Nikita Popov <noreply () php ! net>
Date: 2021-04-12 9:21:12
Message-ID: apRQZbVCCZfyE7hKApt0QvdsHWg7174mOwwduORO27Y () main ! php ! net
[Download RAW message or body]
Author: Nikita Popov (nikic)
Date: 2021-04-12T11:21:08+02:00
Commit: https://github.com/php/pecl-database-mysql/commit/ca514c4dfacd7f1495d2fe142101fe3d91494d12
Raw diff: https://github.com/php/pecl-database-mysql/commit/ca514c4dfacd7f1495d2fe142101fe3d91494d12.diff
Don't throw fatal error if class not found
Changed paths:
M php_mysql.c
Diff:
diff --git a/php_mysql.c b/php_mysql.c
index 1ccf2b1..c5b03e5 100644
--- a/php_mysql.c
+++ b/php_mysql.c
@@ -2188,7 +2188,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_
if (ZEND_NUM_ARGS() < 2) {
ce = zend_standard_class_def;
} else {
- ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO);
+ ce = zend_fetch_class(class_name, ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_SILENT);
}
if (!ce) {
php_error_docref(NULL, E_WARNING, "Could not find class '%s'", ZSTR_VAL(class_name));
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic