• Resolved nicollb

    (@nicollb)


    Incompatibility? my error log is filled (10+ occurances/minute) with:

    xxxx.org [Tue Mar 12 17:10:33 2024] [warn] [pid 194487] fcgid_bucket.c(153): [client xxx.xx.xx.xx:44990] mod_fcgid: stderr: All-in-One Event Calendar: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated @ /usr/www/users/path/to/site/wp-content/plugins/all-in-one-event-calendar/vendor/twig/Lexer.php:198 #8192

    php: 8.1
    WP: 6.4.3
    Plugin: 3.0.1

    The calendar appears to display and function ok.

    I searched the forum and found something similar which claimed to be resolved, but not resolution was posted.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • barrycrous

    (@barrycrous)

    We’re having the same issue, error log file over 1GB full of:

    All-in-One Event Calendar: preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated @ /wp-content/plugins/all-in-one-event-calendar/vendor/twig/Lexer.php

    WP version – 6.4.3
    All-in-One Event Calendar by Time.ly – version 3.0.1

    • This reply was modified 1 year ago by barrycrous.
    Plugin Support yenmer

    (@yenmer)

    Hi @barrycrous

    Thanks for reaching out!

    To better assist you please fill out the following form here, and we will review your request.

    Sincerely,
    Yenmer.
    Timely Customer Support.

    itsmir

    (@itsmir)

    We are experiencing the same issue – please advise the fix asap

    For any others experiencing this issue here are some suggestions…

    Offered with no warranty, please test in your own environment before implementation in production sites… YMMV (-:

    With much gratitude to @leroyrosales and his forked 3.0.0 version at https://github.com/leroyrosales/all-in-one-event-calendar

    To mitigate many of the Deprecation notices being generated in the version 3.0.1 of the plugin you will need to update a number of functions in two library scripts to include the #[\ReturnTypeWillChange] attribute.

    See: https://www.php.net/manual/en/class.returntypewillchange.php

    Also see this very detailed StackOverflow answer for more info and potentially more suggestions about resolving this issue permanently rather than simply supressing the deprecation notices:
    https://stackoverflow.com/questions/71133749/reference-return-type-of-should-either-be-compatible-with-or-the-re

    For example,

    /**
     * @overload ArrayAccess::offsetGet()
     */
    #[\ReturnTypeWillChange]
    public function offsetGet( $offset ) {
        return $this->get_scalar( $offset );
    }

    Change \lib\http\request\abstract.php to update these functions
    public function offsetGet
    public function offsetSet
    public function offsetUnset

    Change lib\iCal\helper\SG_iCal_Line.php to update these functions
    public function offsetExists
    public function offsetGet
    public function offsetSet
    public function offsetUnset
    public function count
    public function getIterator

    vinjoy707

    (@vinjoy707)

    More updates regarding 8.x support. I have found there are a number of patches that need to be made in upstream libraries included in the ai1ec plugin. The included versions of libraries for the ics/ical parsing as well as twig are older and integration of the newer PHP 8.x stable versions is likely quite an endeavor. It may be a while before they are updated in this plugin.

    In addition to the changes originally outlined, the creation of Dynamic Properties has been deprecated in PHP 8.2. See this link for details.
    https://php.watch/versions/8.2/dynamic-properties-deprecated

    To resolve the extensive logging of these notices add #[AllowDynamicProperties] attribute to the class definition, for example:

    #[AllowDynamicProperties]
    class User {
      private int $uid;
    }

    Make the change to include the #[AllowDynamicProperties] the following files:
    lib/http/request.php
    lib/iCal/helper/SG_iCal_Recurrence.php
    lib/scheduling/utility.php
    vendor/lessphp/lessc.inc.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Deprecated function filling up error log’ is closed to new replies.