第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

php 7.4 xampp 嘗試訪問(wèn) null 類型值的數(shù)組偏移量

php 7.4 xampp 嘗試訪問(wèn) null 類型值的數(shù)組偏移量

PHP
臨摹微笑 2023-11-05 15:49:51
在我使用 xampp 之前,我正在使用 lravel 7 項(xiàng)目7.3.21 / PHP 7.3.21,一切都很好,我升級(jí)到了 xampp 7.4.9 / PHP 7.4.9,我得到了Trying to access array offset on value of type null 在我的大部分項(xiàng)目中,這是一個(gè)例子public function show(    $id,    // selects        $selects_names,        $selects_languages,        $selects_models,        $selects_policies,        $selects_types,        $selects_ranks,    // end selects){    return view('curd.show',compact    (        'id'        // select            'selects_names',            'selects_languages',            'selects_models',            'selects_policies',            'selects_types',            'selects_ranks',        // end selects    ));}這是刀片代碼    @if($selects_names)    @foreach($selects_names as $key => $selects_name)        @include(            'treats.show_selects',            [                'name' => $selects_name,                'language' => $selects_languages[$key],                'model' => $selects_models[$key],                'policy' => $selects_policies[$key]  ?? null,                'show_type' => $selects_types[$key],                'rank' => $selects_ranks[$key] ?? null,            ]        )    @endforeach@endif并且總是出現(xiàn)上述錯(cuò)誤,我的程序的大部分都包含在上面的代碼中,它們是 treate 函數(shù),現(xiàn)在大部分都可以工作
查看完整描述

1 回答

?
拉丁的傳說(shuō)

TA貢獻(xiàn)1789條經(jīng)驗(yàn) 獲得超8個(gè)贊

某些鍵$select_names可能不在其他數(shù)組中。$select_policies像對(duì)and所做的那樣為其他數(shù)組定義默認(rèn)值$select_ranks:


[

    'name' => $selects_name,

    'language' => $selects_languages[$key] ?? '',

    'model' => $selects_models[$key] ?? null,

    'policy' => $selects_policies[$key]  ?? null,

    'show_type' => $selects_types[$key] ?? null,

    'rank' => $selects_ranks[$key] ?? null,

]


查看完整回答
反對(duì) 回復(fù) 2023-11-05
  • 1 回答
  • 0 關(guān)注
  • 381 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)