# php error mediawiki



## cm-vdp (Jan 24, 2020)

Situation:
I upgraded php-71 to php-74 on Freebsd 12.1 without any problems.
During the upgrade package mediawiki131--php71-1.31.1 was removed. After the upgrade I installed mediawiki131-php74-1.31.6.
Everything is working fine except I see the following warnings on the webpage:

[24-Jan-2020 15:12:52] WARNING: [pool dom-snwiki] child 791 said into stderr: "NOTICE: PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/local/www/mediawiki/includes/profiler/SectionProfiler.php on line 101"

(also for line 99 and 100)

These are the lines:
$totalCpu = max( $this->end['cpu'] - $this->start['cpu'], 0 );
$totalReal = max( $this->end['real'] - $this->start['real'], 0 );
$totalMem = max( $this->end['memory'] - $this->start['memory'], 0 );

I know what this error means but how can I solve this issue ?
I also look at https://www.mediawiki.org/wiki/Compatibility. There is no reference of php 7.4

Someone an idea ?


----------



## SirDice (Jan 24, 2020)

cm-vdp said:


> I also look at https://www.mediawiki.org/wiki/Compatibility. There is no reference of php 7.4


Then why are you forcing it to run on 7.4?


----------



## cm-vdp (Jan 24, 2020)

I'am not forcing to run it on 7.4. There's a package available mediawiki131-php74.  According to me it means mediawiki is  build for php 7.4.


----------



## joneum@ (Jan 24, 2020)

use PHP 7.2 - this is default


----------

