Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sanity checks for often blocked functions #701

Open
sybrew opened this issue Dec 13, 2024 · 0 comments
Open

Add sanity checks for often blocked functions #701

sybrew opened this issue Dec 13, 2024 · 0 comments
Assignees
Milestone

Comments

@sybrew
Copy link
Owner

sybrew commented Dec 13, 2024

Blij Online reported that PHP function set_time_limit() was unavailable.

We should add a function_exists() check for this function and any other function that might be blocked.
Since we depend on WordPress, let's see what they block. We can safely assume that whatever they don't block is free to use.

Here, I'm only listing functions I recall using before in any project:

  • set_time_limit()
  • session_status()
  • ini_get_all()
  • error_reporting()
  • realpath()
  • hash()
  • ini_get()
  • getenv()
  • sys_get_temp_dir()

Do check these functions:

Looking at TSF and Extension Manager, we only use this function from that list:

  • set_time_limit()

We don't use these in TSF or Extension Manager, but we should check for these when we do:

  • session_status()
  • ini_get_all()

Ignore these functions:

WordPress implemented checks for these inconsistently, so they might as well be removed on their end since anyone using WordPress should unblock these to avoid encountering unexpected errors:

  • error_reporting()
  • realpath()
  • hash()
  • ini_get()
  • getenv()

Lastly, this function is checked consistently in WordPress but not in their dependencies (PHPMailer and Simplepie), causing an issue for most users as well:

  • sys_get_temp_dir()
@sybrew sybrew added this to the 5.1.3 milestone Dec 13, 2024
@sybrew sybrew self-assigned this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant