G
G
Good Samaritan2018-12-01 15:08:23
1C-Bitrix
Good Samaritan, 2018-12-01 15:08:23

Why does the script suddenly stop running?

I am updating an element

//update element
if($_REQUEST['action']=='update'){
    $el = new CIBlockElement;
    $PROP = array();

    foreach ($_REQUEST as $key=>$value){
        $PROP[$key]=$value;
    }
    
    $arLoadProductArray = Array(

        "IBLOCK_SECTION_ID" => false,
        "PROPERTY_VALUES"=> $PROP,
        "NAME"           => $PROP["name"],
        "ACTIVE"         => "Y",
        "PREVIEW_TEXT"   => "",
        "DETAIL_TEXT"    => "",
        "DETAIL_PICTURE" => ""
    );
    
    $PRODUCT_ID = $PROP["ID"];
    $el->Update($PRODUCT_ID, $arLoadProductArray);
    echo "Error: ".$el->LAST_ERROR;
    
}

element is updated, but the code after it is not executed for some reason. everything stops after the line $el->Update($PRODUCT_ID, $arLoadProductArray);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ainur Valiev, 2018-12-01
@djamali

see logs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question