Skip to content

Php 7.4 ... so many Notice and some solution #16

@derSteffen

Description

@derSteffen

Hello,
I use the 2.1.1 and PHP 7.4 and I test only with the code-snipped from the NEW-code-snippets.php. In the config I have activated the error-reporting.

Here the notice and some solutions (but maybe, there are better solutions).

Notice: Undefined variable: j in /webyep-system/program/elements/WYGalleryElement.php on line 69
Is there an mistake in 69?
$j++; why $J ???

And then there a lot of Notice: Undefined index: loopid (in WYImageElement, WYAttachemant, WYGallery, RichText, Menu, ShortText, ans so on ).

For this Notice i have the following solution.

Change this
$webyep_oCurrentLoop->iLoopID=$_SESSION["loopid"];
in this
$webyep_oCurrentLoop->iLoopID = isset($_SESSION["loopid"]) ? $_SESSION["loopid"] : 0;

and in the WYGalleryElement additional
change this
$sHTML = str_replace("WEBYEP_LOOP_ID=","WEBYEP_LOOP_ID=".$_SESSION["loopid"]."&",$sHTML);
in this
$tempsession = isset($_SESSION["loopid"]) ? $_SESSION["loopid"] : 0;
$sHTML = str_replace("WEBYEP_LOOP_ID=","WEBYEP_LOOP_ID=".$tempsession."&",$sHTML);

And there is a second get_magic_quotes_gpc-error in the /lib/WYApplication.php

I have change this
if ($bStrip && get_magic_quotes_gpc()) $sValue = stripslashes($sValue);
in this
if (version_compare(PHP_VERSION, '5.3.0', '<')) { if ($bStrip && get_magic_quotes_gpc()) $sValue = stripslashes($sValue); }

Notice: Undefined variable: webyep_oCurrentLoop in /webyep-system/program/elements/WYGalleryElement.php on line 124
maybe the soltion is to change this
if($webyep_oCurrentLoop){
in this
if(!empty($webyep_oCurrentLoop)){

If I use the menu and this is empty, the following notice is shown:
Notice: Undefined index: VERSION in /webyep-system/program/lib/WYElement.php on line 112

Notice: Undefined index: VERSION in /webyep-system/program/lib/WYElement.php on line 112

For this error i had change this
return $this->dContent[WY_DK_VERSION];
in this
if(!empty($this->dContent[WY_DK_VERSION])) { return $this->dContent[WY_DK_VERSION]; }

And here the notice, which I can't solve. Is there anybody to can help me?

If i have more than one WYLongTextElement, the following Notice will be shown:
Undefined offset: 1 in /webyep-system/program/elements/WYLongTextElement.php on line 21

Notice: Trying to get property of non-object in /elements/WYLongTextElement.php on line 19

Notice: Trying to get property 'dContent' of non-object in /webyep-system/program/elements/WYLongTextElement.php on line 19

Notice: Trying to access array offset on value of type null in /webyep-system/program/elements/WYLongTextElement.php on line 19

Notice: Trying to access array offset on value of type null in /webyep-system/program/elements/WYLongTextElement.php on line 21

If you are logged in ... and with the time you will be automatic logged out the follwing error will be display:

Warning: include(permissions-error.php): failed to open stream: No such file or directory in /program/lib/WYEditor.php on line 153

Greetings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions