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

php8 error #33

Open
yeizac opened this issue Sep 22, 2024 · 2 comments
Open

php8 error #33

yeizac opened this issue Sep 22, 2024 · 2 comments

Comments

@yeizac
Copy link

yeizac commented Sep 22, 2024

concretecms 9.3.4
php8.3.10
c5_ratings 1.0.1

"Rating Button" block Error saving.

Array to string conversion
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Exception\ErrorException->null
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Run->handleError
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(82): Concrete\Package\C5jRatings\Block\C5jRatingBtn\Controller->generate

An error occurs when saving the Rating Page List block.

Array to string conversion
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Exception\ErrorException->null
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Run->handleError
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(82): Concrete\Package\C5jRatings\Block\C5jRatingPageList\Controller->generate

@leal-k
Copy link

leal-k commented Oct 3, 2024

Hi yeizac. We just released a new version of the package that is not throwing that error, so please update the package and if you find the same error, please report the issue again. Thanks.

@yeizac
Copy link
Author

yeizac commented Oct 4, 2024

I updated to 1.0.2 and set the rating.
I'm getting the same error.

Array to string conversion

/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Exception\ErrorException->null
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(64): Whoops\Run->handleError
/home/abilities/abilities.sixcore.jp/public_html/packages/c5j_ratings/src/Traits/RatingTrait.php(82): Concrete\Package\C5jRatings\Block\C5jRatingBtn\Controller->generate
/home/abilities/abilities.sixcore.jp/public_html/updates/concrete-cms-9.3.2/concrete/controllers/dialog/page/add_block.php(103): Concrete\Package\C5jRatings\Block\C5jRatingBtn\Controller->validate

I checked RatingTrait.php, but it hasn't changed.

public function generate($action = '', $time = null, $uID = 0): string
{ $app = Application::getFacadeApplication(); $u = $app->make(User::class); $user = $u->getByUserID($uID); if ($user) { $uID = $user->getUserID(); } else { $uID = 0; } if (!$time) { $time = time(); } $config = $app->make('config/database'); return $time . ':' . md5($time . ':' . $uID . ':' . $action . ':' . $config->get('concrete.security.token.validation')); }

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