Title: PHP 8 support
Last modified: February 18, 2022

---

# PHP 8 support

 *  [fosteran](https://wordpress.org/support/users/fosteran/)
 * (@fosteran)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-8-support-26/)
 * Hi –
 * Apparently this plugin does not work on PHP 8. Are there any plans to migrate
   to this version?
 * Thanks

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

 *  Plugin Author [Alain-Aymerick FRANCOIS](https://wordpress.org/support/users/aaf017/)
 * (@aaf017)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-8-support-26/#post-15425920)
 * Hi,
 * Sorry, i don’t have much free time at the moment. I’ve done some changes and 
   tested the plugin under Docker php:8.1.0-fpm. I’have fixed somes bugs due to 
   PHP8 changes.
    Everything seems to work but i’m not sure.
 * So, before i push the new release, I invite you and all volunteers to test the
   trunk branch which contains the latest changes.
 * [https://plugins.trac.wordpress.org/browser/wp-cassify/trunk](https://plugins.trac.wordpress.org/browser/wp-cassify/trunk)
 * Best regards.
 *  [bap72190](https://wordpress.org/support/users/bap72190/)
 * (@bap72190)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-8-support-26/#post-15703782)
 * Found another issue that came up with php 8.2
 * In wp_cassify_plugin.php, function wp_cassify_is_in_while_list:
 * Explode now returns an array with an empty string if no values are found, which
   results in it always returning true for the function. Fixed this with this line:
 * $white_list_urls = empty($wp_cassify_redirect_url_white_list)? “” : explode( ‘;’,
   $wp_cassify_redirect_url_white_list );
 *  [kkatpcc](https://wordpress.org/support/users/kkatpcc/)
 * (@kkatpcc)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-8-support-26/#post-15879252)
 * I can confirm the whitelist problem. A breaking change in how strrpos treats 
   empty needle strings in PHP 8+ is causing WP_Cassify_Plugin::wp_cassify_is_in_while_list
   to bypass CAS auth by default. Details: [https://github.com/php/php-src/issues/8582](https://github.com/php/php-src/issues/8582)
 * Another quick fix is to wrap the explode in array_filter: `$white_list_urls =
   array_filter(explode( ';', $wp_cassify_redirect_url_white_list ));`
 *  [avscherbs](https://wordpress.org/support/users/ariannev/)
 * (@ariannev)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/php-8-support-26/#post-16006769)
 * [@kkatpcc](https://wordpress.org/support/users/kkatpcc/) This worked nicely for
   me. Thanks for sharing the the reference link and the straightforward fix!
 *  [dgeo](https://wordpress.org/support/users/dgeo/)
 * (@dgeo)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-support-26/#post-16384711)
 * [@kkatpcc](https://wordpress.org/support/users/kkatpcc/) thank you !
 * Here I have to patch to make CAS login fire:
 *     ```wp-block-code
       --- wp-content/plugins/wp-cassify/classes/wp_cassify_plugin.php.orig    2022-11-17 13:10:24.358921000 +0100
       +++ wp-content/plugins/wp-cassify/classes/wp_cassify_plugin.php 2022-11-17 12:54:40.341842000 +0100
       @@ -1133,7 +1133,7 @@
                        $is_in_while_list = false;
   
                        $wp_cassify_redirect_url_white_list = WP_Cassify_Utils::wp_cassify_get_option( $this->wp_cassify_network_activated, 'wp_cassify_redirect_url_white_list' );
       -                $white_list_urls = explode( ';', $wp_cassify_redirect_url_white_list );
       +                $white_list_urls = array_filter(explode( ';', $wp_cassify_redirect_url_white_list ));
   
                        if ( ( is_array( $white_list_urls ) ) && ( count( $white_list_urls ) > 0 ) ){
                               foreach( $white_list_urls as $white_url ) {
       ```
   
 * Please update plugin (it breaks at each update with php 8.1)

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

The topic ‘PHP 8 support’ is closed to new replies.

 * ![](https://ps.w.org/wp-cassify/assets/icon-256x256.png?rev=3112582)
 * [WP Cassify](https://wordpress.org/plugins/wp-cassify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cassify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cassify/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cassify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cassify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cassify/reviews/)

 * 5 replies
 * 6 participants
 * Last reply from: [dgeo](https://wordpress.org/support/users/dgeo/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/php-8-support-26/#post-16384711)
 * Status: not resolved