mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-29 11:55:42 +00:00
Fix Bug #54918 - Crash when there is a failure to read the browscap file
This commit is contained in:
1 parent
0aaedef71d
commit
974c3b4981
1 file changed
+7
-7
@@ -333,19 +333,19 @@ PHP_INI_MH(OnChangeBrowscap)
|
||||
PHP_MINIT_FUNCTION(browscap) /* {{{ */
|
||||
{
|
||||
char *browscap = INI_STR("browscap");
|
||||
|
||||
if (browscap && browscap[0]) {
|
||||
if (browscap_read_file(browscap, &global_bdata, 1 TSRMLS_CC) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef ZTS
|
||||
ts_allocate_id(&browscap_globals_id, sizeof(browser_data),
|
||||
browscap_globals_ctor, NULL);
|
||||
#endif
|
||||
/* ctor call not really needed for non-ZTS */
|
||||
|
||||
if (browscap && browscap[0]) {
|
||||
if (browscap_read_file(browscap, &global_bdata, 1 TSRMLS_CC) == FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
Reference in new issue
Block a user