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

Multiple issues detected when running on PHP 8 #184

Open
vandevusse opened this issue Jul 25, 2023 · 1 comment
Open

Multiple issues detected when running on PHP 8 #184

vandevusse opened this issue Jul 25, 2023 · 1 comment

Comments

@vandevusse
Copy link

Succinct list of issues found so far as follows:

  1. Helpers::keyExists
    $haystack can be passed as empty, causes in_array function to throw exception

  2. UserRepository::isFavorite
    $favorites can be empty, causes in_array function to throw exception

  3. SyncSingleFavorite::addFavorite
    $favorites[$key]['posts'][] = $this->post_id; causes the following error:
    Fatal error: [] operator not supported for strings
    I believe the issue here is that the $favorites[$key]['posts'] array is not initialized

Issue also occurs lower down at $favorites[$key]['groups'][$group_key]['posts']

@MacGyer
Copy link

MacGyer commented Apr 2, 2024

Another one, introduced with 2.3.4:

PHP Deprecated: Optional parameter $site_id declared before required parameter $all_favorites is implicitly treated as a required parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants