English 中文(简体)
警告:没有界定的财产:自php8.1以来的弹片
原标题:Warning: Undefined property: stdClass since php8.1

自从更新第8.1号文件以来,我把这个问题放在一个会带来以下错误的论坛。

Warning: Undefined property: stdClass::$1 in /ActivityShow.php on line 2271

页: 1

<p style= color: #BD3A84; font-weight: 600; margin-bottom: 0px; >" .
                $obj->locatie->{1} .

the code given is:

public function regicareActivitiesClusterBewegen($activityID) {
    global $activity;
    $everything = null;

    try {
        $key = 329;
        if ($activityID != -1) {

            $currentActivity = json_decode(
                                json_encode(
                                    $activity->getSpecificActivity($activityID)), true);
            $key = count($currentActivity["vrijkenmerk07"]) > 0 
                        ? array_keys($currentActivity["vrijkenmerk07"])[0] 
                        : 329;
        }

        $everything = $activity->getAllActivities(["vrijkenmerk07" => [$key]]);
    } catch (GuzzleHttpExceptionBadResponseException $e) {
        $nothing = "<p>excuses voor het ongemak de activiteiten zijn op het moment niet beschikbaar</p>";
    }
    ob_start();

    if ($everything) {
        foreach($everything as $obj) {
            echo "
                <table style= width:100%; border-radius: 10px; margin-bottom: 0px; box-shadow: 1px 2px 5px 0px #888888; >
                <tbody>
                <tr>
                    <td style= border-right: 3px solid #e9e9e9; padding-left: 5px; width: 66%; border-bottom: none; >
                            <p style= color: black; font-size:16px; margin-bottom: 0px; font-weight: 600;  >" . $obj->omschrijving . "</p> 
                          <p style= color: #BD3A84; font-weight: 600; margin-bottom: 0px; >" .
                        $obj->locatie->{1} .
                        $obj->locatie->{2} .
                        $obj->locatie->{3} .
                        $obj->locatie->{4} .
                        $obj->locatie->{5} .
                        $obj->locatie->{6} .
                        $obj->locatie->{7} .
                        $obj->locatie->{8} .
                        $obj->locatie->{13} .
                        $obj->locatie->{26} .
                        $obj->locatie->{29} .
                        $obj->locatie->{32} .
                        $obj->locatie->{34} .
                        $obj->locatie->{38} .
                        $obj->locatie->{40} .
                        $obj->locatie->{46} .
                        $obj->locatie->{47} .
                        $obj->locatie->{50} .
                        $obj->locatie->{51} .
                        $obj->locatie->{52} .
                        $obj->locatie->{55} .
                        $obj->locatie->{56} .
                        $obj->locatie->{57} .
                        $obj->locatie->{58} .
                        $obj->locatie->{59} .
                        "</p>
                    </td>
                    <td style= padding: 0px; vertical-align: middle; width: 17%; border-bottom: none; >
                        <p style= margin-bottom: 0px; font-size: 17px; text-align: center; color: gray; >kosten</p>
                        <p style= font-size: 18px; color: black; font-weight: 600; margin-bottom: 0px; text-align: center; >"
                        . "€". number_format($obj->prijs, 2,  , ,    ) . "</p>
                    </td>
                    <td style= padding: 0px; width: 17%; border-top-right-radius: 10px; border-bottom-right-radius:10px; border-bottom: none; vertical-align: middle; text-align: center; background-color: #BD3A84;  >
                            <a href= http://cbwedamvolendam.nl/inschrijven/?activityID=$obj->activiteitID > <button class= btn btn-inschrijven >inschrijven</button> </a>
                    </td>
                </tr>
            <br>
            </tbody>
            </table>";
        }
    } else {
        echo $nothing;
    }
    return ob_get_clean();
}

当我var(ump)时,我拿不到的美元。

enter image description here

What I expect is that the Locatie will be in ever table as below. When locatie is available show otherwise empty. This works fine with php 7.4.

“entergraph

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签