Refactor class.Product.php and class.S.php for improved code readability and maintainability

This commit is contained in:
2024-10-29 11:26:06 +01:00
parent f9fed8def3
commit 4f1f4fa4da
15 changed files with 1360 additions and 1717 deletions

View File

@@ -795,7 +795,7 @@ class Product implements \ArrayAccess
{
$result = array();
while ( list($key, $values) = each( $input ) )
foreach ( $input as $key => $values )
{
if ( empty( $values ) )
continue;
@@ -834,7 +834,7 @@ class Product implements \ArrayAccess
public function __get( $variable )
{
if ( array_key_exists( $variable, $this -> data ) )
if ( is_array( $this -> data ) and array_key_exists( $variable, $this -> data ) )
return $this -> $variable;
}