Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
derSteffen opened this issue Mar 9, 2021 · 0 comments
Open

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

derSteffen opened this issue Mar 9, 2021 · 0 comments

Comments

@derSteffen
Copy link

derSteffen commented Mar 9, 2021

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

@derSteffen derSteffen changed the title Php 7.4 ... so many Notice and some solution (need help) Php 7.4 ... so many Notice and some solution Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant