Give A Hand plug in error

Hi, I upgraded my php to 8.0 and my site crashed. This is the message I get:

Fatal error: Unparenthesized a ? b : c ? d : e is not supported. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /customers/5/2/a/yadsl.org/httpd.www/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/multi_select.class.php on line 23

Unfortunately the parallaxslider mentioned in the message is not a stand alone plugin I can simply unistall.

Can anyone help me out?

The plugin is not supported by PHP8. Downgrade the PHP to 7.4

I guess this theme is abandoned, which sucks - the authors say they’re available for hire, but I wouldn’t hire someone who can’t take 30 minutes to update their theme.

Anyway, I took those 30 minutes, here’s a patch for others in this situation:

diff --git a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/checkboxes.class.php b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/checkboxes.class.php
index ea53de8d..213e1e03 100644
--- a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/checkboxes.class.php
+++ b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/checkboxes.class.php
@@ -23,7 +23,7 @@ class Cuztom_Field_Checkboxes extends Cuztom_Field
                        {
                                foreach( $this->options as $slug => $name )
                                {
-                                       $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id( $this->id . $this->after_id . '_' . Cuztom::uglify( $slug ) ) . ' ' . $this->output_css_class() . ' value="' . $slug . '" ' . ( is_array( $value ) ? ( in_array( $slug, $value ) ? 'checked="checked"' : '' ) : ( ( $value == '-1' ) ? '' : in_array( $slug, $this->default_value ) ? 'checked="checked"' : '' ) ) . ' /> ';
+          $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id($this->id . $this->after_id . '_' . Cuztom::uglify($slug)) . ' ' . $this->output_css_class() . ' value="' . $slug . '" ' . (is_array($value) ? (in_array($slug, $value) ? 'checked="checked"' : '') : ($value == '-1' ? '' : (in_array($slug, $this->default_value) ? 'checked="checked"' : ''))) . ' />';^M
                                        $output .= '<label ' . $this->output_for_attribute( $this->id . $this->after_id . '_' . Cuztom::uglify( $slug ) ) . '>' . Cuztom::beautify( $name ) . '</label>';
                                        $output .= '<br />';
                                }
@@ -39,4 +39,4 @@ class Cuztom_Field_Checkboxes extends Cuztom_Field
        {
                return empty( $value ) ? '-1' : $value;
        }
-}
\ No newline at end of file
+}^M
diff --git a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/multi_select.class.php b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/multi_select.class.php
index 7939f1a0..a8caecc6 100644
--- a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/multi_select.class.php
+++ b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/multi_select.class.php
@@ -20,13 +20,14 @@ class Cuztom_Field_Multi_Select extends Cuztom_Field
        {
                $output = '<select ' . $this->output_name() . ' ' . $this->output_id() . ' ' . $this->output_css_class() . ' multiple="true">';
                        if( isset( $this->args['show_option_none'] ) )
-                               $output .= '<option value="0" ' . ( is_array( $value ) ? ( in_array( 0, $value ) ? 'selected="selected"' : '' ) : ( ( $value == '-1' ) ? '' : in_array( 0, $this->default_value ) ? 'selected="selected"' : '' ) ) . '>' . $this->args['show_option_none'] . '</option>';
+                               $output .= '<option value="0" ' . is_array($value) ? (in_array(0, $value) ? 'selected="selected"' : '') : ($value == '-1' ? '' : (in_array(0, $this->default_value) ? 'selected="selected"' : '')) . '>' . $this->args['show_option_none'] . '</option>';^M
 
                        if( is_array( $this->options ) )
                        {
                                foreach( $this->options as $slug => $name )
                                {
-                                       $output .= '<option value="' . $slug . '" ' . ( is_array( $value ) ? ( in_array( $slug, $value ) ? 'selected="selected"' : '' ) : ( ( $value == '-1' ) ? '' : in_array( $slug, $this->default_value ) ? 'selected="selected"' : '' ) ) . '>' . Cuztom::beautify( $name ) . '</option>';
+          $output .= '<option value="' . $slug . '" ' . (is_array($value) ? (in_array($slug, $value) ? 'selected="selected"' : '') : ($value == '-1' ? '' : (in_array($slug, $this->default_value) ? 'selected="selected"' : ''))) . '>' . Cuztom::beautify($name) . '</option>';^M
+^M
                                }
                        }
                $output .= '</select>';
@@ -40,4 +41,4 @@ class Cuztom_Field_Multi_Select extends Cuztom_Field
        {
                return empty( $value ) ? '-1' : $value;
        }
-}
\ No newline at end of file
+}^M
diff --git a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/post_checkboxes.class.php b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/post_checkboxes.class.php
index 5f6b722f..c9a5f634 100644
--- a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/post_checkboxes.class.php
+++ b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/post_checkboxes.class.php
@@ -32,7 +32,7 @@ class Cuztom_Field_Post_Checkboxes extends Cuztom_Field
                        {
                                foreach( $this->posts as $post )
                                {
-                                       $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id( $this->id . $this->after_id . '_' . Cuztom::uglify( $post->post_title ) ) . ' ' . $this->output_css_class() . ' value="' . $post->ID . '" ' . ( is_array( $value ) ? ( in_array( $post->ID, $value ) ? 'checked="checked"' : '' ) : ( ( $value == '-1' ) ? '' : in_array( $post->ID, $this->default_value ) ? 'checked="checked"' : '' ) ) . ' /> ';
+          $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id($this->id . $this->after_id . '_' . Cuztom::uglify($post->post_title)) . ' ' . $this->output_css_class() . ' value="' . $post->ID . '" ' . (is_array($value) ? (in_array($post->ID, $value) ? 'checked="checked"' : '') : ($value == '-1' ? '' : (in_array($post->ID, $this->default_value) ? 'checked="checked"' : ''))) . ' />';^M
                                        $output .= '<label for="' . $this->id . $this->after_id . '_' . Cuztom::uglify( $post->post_title ) . '">' . $post->post_title . '</label>';
                                        $output .= '<br />';
                                }
@@ -48,4 +48,4 @@ class Cuztom_Field_Post_Checkboxes extends Cuztom_Field
        {
                return empty( $value ) ? '-1' : $value;
        }
-}
\ No newline at end of file
+}^M
diff --git a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/term_checkboxes.class.php b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/term_checkboxes.class.php
index 15c3506c..43b2e2c3 100644
--- a/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/term_checkboxes.class.php
+++ b/wp-content/plugins/giveahand-plugin/parallaxslider/includes/cuztom/classes/fields/term_checkboxes.class.php
@@ -34,7 +34,7 @@ class Cuztom_Field_Term_Checkboxes extends Cuztom_Field
                        {
                                foreach( $this->terms as $term )
                                {
-                                       $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id( $this->id . $this->after_id . '_' . Cuztom::uglify( $term->name ) ) . ' ' . $this->output_css_class() . ' value="' . $term->term_id . '" ' . ( is_array( $value ) ? ( in_array( $term->term_id, $value ) ? 'checked="checked"' : '' ) : ( ( $value == '-1' ) ? '' : in_array( $term->term_id, $this->default_value ) ? 'checked="checked"' : '' ) ) . ' /> ';
+                                       $output .= '<input type="checkbox" ' . $this->output_name() . ' ' . $this->output_id($this->id . $this->after_id . '_' . Cuztom::uglify($term->name)) . ' ' . $this->output_css_class() . ' value="' 
. $term->term_id . '" ' . (is_array($value) ? (in_array($term->term_id, $value) ? 'checked="checked"' : '') : ($value == '-1' ? '' : (in_array($term->term_id, $this->default_value) ? 'checked="checked"' : ''))) . ' />';^M
                                        $output .= '<label for="' . $this->id . $this->after_id . '_' . Cuztom::uglify( $term->name ) . '">' . $term->name . '</label>';
                                        $output .= '<br />';
                                }
diff --git a/wp-content/plugins/giveahand-plugin/widgets/tweets-widget.php b/wp-content/plugins/giveahand-plugin/widgets/tweets-widget.php
index 10cb23f2..00d52991 100644
--- a/wp-content/plugins/giveahand-plugin/widgets/tweets-widget.php
+++ b/wp-content/plugins/giveahand-plugin/widgets/tweets-widget.php
@@ -8,7 +8,7 @@ function tweets_load_widgets()
 
 class Tweets_Widget extends WP_Widget {
        
-       function Tweets_Widget()
+       function __construct()^M
        {
                $widget_ops = array('classname' => 'tweets', 'description' => '');