Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor includes/extra_cart_actions/stock_by_attributes.php
Modified sequence of data check to try to apply simple check first to reduce processing load. Added space between if and parentheses where one was missing. In some cases used both the `isset` and `array_key_exists` function to detect existence as isset can be faster. This was not applied throughout. Tried to reduce else options of if/else. Reduced some logic testing such as changing `!exists || (exists && something)` to just `!exists || something`. if `not exists` fails, that means that it exists and therefore not necessary to test for existence again. Removed the direct call to `unset($fileVar['file_located'])` because $fileVar is set to an empty array, therefore should be effectively unset. Added a strict error processing check for customer_id.
- Loading branch information
1 parent
958f428
commit 262267c
Showing
1 changed file
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters