Php 8.1.x breaks module completely

Created on 6 December 2022, over 1 year ago
Updated 7 April 2024, 3 months ago

Problem/Motivation

This module supplies no output with Php 8, whcch is now required by Drupal 9.4.x

Steps to reproduce

Install module into latest Drupal 9, create content or blocks using the Php filter, and there is no output.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Closed: cannot reproduce

Version

1.1

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States wmfinck

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ท๐Ÿ‡ดRomania idflorin

    I can't reproduce.
    <?php echo "hello", "world"; ?>
    It works fine for me on drupal core 9.5.2 + PHP 8.1

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bill_redman

    I just updated my site to PHP 8.1.14 and although my pages that utilize this module are still working as they should, I now get the following warning displayed twice on every page of my site:

    Warning: Undefined array key "s" in eval() (line 5 of modules/composer/php/php.module(81) : eval()'d code).

    Any thoughts would be appreciated. Thanks.

  • Status changed to Postponed: needs info 3 months ago
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    @bill_redman: that is an error in your eval()-ed code, that is the code you input using the PHP filter. That is not the PHP filter's fault.

    @wmfinck: are there errors logged in your error log?

  • Status changed to Closed: cannot reproduce 3 months ago
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    Running tests on GitLab CI now with PHP 8.1, they pass fine. https://git.drupalcode.org/project/php/-/jobs/1237898

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States wmfinck

    @Gรกbor Hojtsy

    I am sorry, while I am still hoping I can use this module in the future, I had postponed all of my website upgrades until recently, because with D9 the migration process still had too many quirks. When I had posted this particular issue, I only had 1 live D9 site at that time, which was a a fresh D9 install.

    Now that I have resumed upgrading my 30+ sites away from D7, I am going to D10 and my servers are configured for php 8.2.

    Wish I could help, but thank you!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States wmfinck

    But I would gladly give the module a test run, and report back here, if I could install it on a D10 site. I need to use it to post metadata from my shoutcast server onto pages or blocks.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States wmfinck

    As I commented in the thread for Drupal 10 Support ๐Ÿ“Œ Drupal 10 Support Fixed for this module, I have just tested a block containing php code with the latest dev release of this module.

    It is a small test, but the php code is complex, retrieving metadata from several different Shoutcast streams and displaying it in a block on the website.

    The module is now working very well with Drupal 10.5 and PHP 8.2.17.

    Thanks again!

Production build 0.69.0 2024