Skip to content

Commit

Permalink
Merge pull request #17 from denispugachev/add_id_key_validation_on_af…
Browse files Browse the repository at this point in the history
…ter_iblock_update

Добавлена проверка $field['ID'] > 0 в обработчике события после изменения инфоблока
  • Loading branch information
niksamokhvalov authored Mar 17, 2017
2 parents 9e0aff9 + db575cc commit 15562e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Iblock/IblockFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ public static function onAfterIBlockAdd(&$fields)

public static function onAfterIBlockUpdate(&$fields)
{
if ($fields['RESULT']) {
if ($fields['RESULT'] && $fields['ID'] > 0) {
static::deleteCacheByTag('bex_iblock_' . $fields['ID']);
static::deleteCacheByTag('bex_iblock_new');
new static(['id' => $fields['ID']]);
Expand Down

0 comments on commit 15562e8

Please sign in to comment.