#18744 closed enhancement (invalid)
Check if web hosting allows fopen
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
I had encounter error on many web hosting when using the get_theme_data() function which uses get_file_data()in functions.php in wp-includes folder.
Many web hosting has disabled allow_url_fopen,
was thinking if it is possible to add some checks to get_file_data() to prevent fopen errors in this situation, by returning empty array if allow_url_fopen is disabled.
Thanks!
Attachments (1)
Change History (5)
#2
@
13 years ago
Yes, I am using get_theme_data() to get the theme information on locally installed theme, but was met with fopen error, because allow_url_fopen, if set to Off in php.ini will disallow fopen function completely. All web hosting has different settings, so was thinking of adding this check so that perhaps, it can fail silently.
I wasn't using get_file_data() to get any external site file.
Thanks!
Shouldn't
get_file_data()
be used for local files only?