}
if (filename) {
- fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ RETURN_FALSE;
+ }
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
+ efree(fullpath);
RETURN_FALSE;
}
return;
}
- fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ RETURN_FALSE;
+ }
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key */
- fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ RETURN_FALSE;
+ }
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key */
- fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ php_std_error_handling();
+ if (object) {
+ RETURN_NULL();
+ } else {
+ RETURN_FALSE;
+ }
+ }
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
php_std_error_handling();
RETURN_FALSE;
}
}
-
}
php_sqlite_open(fullpath ? fullpath : filename, (int)mode, NULL, return_value, errmsg, object TSRMLS_CC);
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key */
- fullpath = expand_filepath(filename, NULL TSRMLS_CC);
+ if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
+ php_std_error_handling();
+ RETURN_NULL();
+ }
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);