help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

JEM and PHP 8

JEM and PHP 8

3 years 9 months ago
#28364
A few months ago, I reported some errors and their fixes during the migration sites in Apache/2.4.46, OpenSSL/1.1.1j, PHP/8.0.3 and JEM version 2.3.0. Today I am updating JEM version 2.3.1 and I am experiencing the same errors. Also, I will point them out to you once again below hoping it can help:

...\administrator\components\com_jem\views\categories\tmpl\default.php
An error has occurred: 0 implode(): Argument #2 ($array) must be of type array, string given (line 190)
Correction: <input type="hidden" name="original_order_values" value="<?php echo implode(",", $originalOrders); ?>" />

...\components\com_jem\classes\iCalcreator.class.php
Fatal error: Array and string offset access syntax with curly braces is no longer supported in ...\components\com_jem\classes\iCalcreator.class.php on line 1668
Correction: while( isset( $this->unparsed[$i+1] ) && !empty( $this->unparsed[$i+1] ) && ( ' ' == $this->unparsed[$i+1][0] ))

Fatal error: Array and string offset access syntax with curly braces is no longer supported in ...\components\com_jem\classes\iCalcreator.class.php on line 3066
Correction: ( in_array( $fbMember[0], array( 'P', '+', '-' )))) {

Fatal error: Array and string offset access syntax with curly braces is no longer supported in ...\components\com_jem\classes\iCalcreator.class.php on line 4255
Correction: $unique .= $base[mt_rand( $start, $end )];

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 ...\components\com_jem\classes\iCalcreator.class.php on line 6961
Correction: $tzid = ( isset( $theDate )) ? $theDate : (( 7 == count( $theDate )) ? end( $theDate ) : null);

Fatal error: Array and string offset access syntax with curly braces is no longer supported in ...\components\com_jem\classes\iCalcreator.class.php on line 7059
Correction: iCalUtilityFunctions::$baseDelim .= $base[mt_rand( 0, $len )];

After these few fixes, JEM works perfectly.
Have a nice day staying safe and healthy,
Joel
The following user(s) said Thank You: Wolfgang

Please Log in or Create an account to join the conversation.

Re: JEM and PHP 8

3 years 9 months ago - 3 years 9 months ago
#28365
Thank you Joel, your input is welcome!

Unfortunately PHP 8 compatibility was still not in the focus.
Even the Joomla! 4 migration has a higher precedence, as far as I know.
But if these few patches do the full job for PHP 8, it is really time to rethink this.
Last edit: 3 years 9 months ago by Wolfgang.

Please Log in or Create an account to join the conversation.

Re: JEM and PHP 8

3 years 9 months ago - 3 years 9 months ago
#28366
Sorry, but it is strange, because this is your first post here (at least with this username)?
But thank you anyway, we will have a look, how to integrate this.
I tested, it worked with php 7 too!
Last edit: 3 years 9 months ago by jojo12.

Please Log in or Create an account to join the conversation.

Re: JEM and PHP 8

3 years 9 months ago - 3 years 9 months ago
#28368
There is a problem in output.class.php:

Deprecated: Required parameter $params follows optional parameter $view in /srv/www/vhosts/mysite.ch/httpdocs/components/com_jem/classes/output.class.php on line 848

but when I change from:
Code:
static public function mapicon($data, $view = false, $params)

to:
Code:
static public function mapicon($data, $params, $view = false)

I get an error calling the eventdetailview
call to a member function get()
EDIT:
When I change to:
Code:
static public function mapicon($params, $data, $view = false)
it seems to work but gives an error:
Warning: Attempt to read property "map" on string in /srv/www/vhosts/mysite.ch/subdomains/intra/httpdocs/components/com_jem/classes/output.class.php on line 854
Last edit: 3 years 9 months ago by jojo12.

Please Log in or Create an account to join the conversation.

Re: JEM and PHP 8

3 years 9 months ago
#28369
who knows a solution?

Please Log in or Create an account to join the conversation.

Re: JEM and PHP 8

3 years 9 months ago
#28371
Indeed, you're right, I posted my message on the Joomla forum because at that time, it was impossible to create an account on the JEM forum.

>I tested, it worked with php 7 too!
In Fact, I had tested these modifications in PHP 7 and it worked but I forgot to specify it.

Have a nice day ahead
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Time to create page: 0.498 seconds