| @@ -235,12 +235,8 @@ | ||
| 235 | 235 | /// @TODO: Matches may be used later to evaulate variables inside code block. |
| 236 | 236 | if($matchedExpression = @preg_match("/{$expression}/", $expressionsRequestURL)) { |
| 237 | 237 | break; |
| 238 | 238 | } |
| 239 | - else if ($matchedExpression === false) { // Error | |
| 240 | - $message .= "<div style='background-color:red;font-size:20px;'>There are expression error in '{$block->name}' Block!! Expr=({$expression})</div>"; | |
| 241 | - echo($message); | |
| 242 | - } | |
| 243 | 239 | } |
| 244 | 240 | } |
| 245 | 241 | /** |
| 246 | 242 | * Exclude Links & Expressions Blocks that doesn't has a match. |
| @@ -457,15 +453,15 @@ | ||
| 457 | 453 | public function shortcode($attributes) { |
| 458 | 454 | // Initialize vars. |
| 459 | 455 | $replacement = ''; |
| 460 | 456 | // Default Class. |
| 461 | - if (!$attributes['class']) { | |
| 457 | + if (!isset($attributes['class'])) { | |
| 462 | 458 | $class = 'block'; |
| 463 | 459 | } |
| 464 | 460 | switch ($class) { |
| 465 | 461 | case 'block': |
| 466 | 462 | // Get is the default "operation"! |
| 467 | - if (!$attributes['op']) { | |
| 463 | + if (!isset($attributes['op'])) { | |
| 468 | 464 | $attributes['op'] = 'get'; |
| 469 | 465 | } |
| 470 | 466 | switch ($attributes['op']) { |
| 471 | 467 | case 'get': |
| @@ -471,11 +467,11 @@ | ||
| 471 | 467 | case 'get': |
| 472 | 468 | // Import dependecies. |
| 473 | 469 | cssJSToolbox::import('framework:db:mysql:xtable.inc.php'); |
| 474 | 470 | // Output block if 'force="true" or only if it wasn't already in the header/footer! |
| 475 | - if ((($attributes['force'] == "true") || !in_array($attributes['id'], $this->onActionIds))) { | |
| 471 | + if ((((isset($attributes['force'])) && ($attributes['force'] == "true")) || !in_array($attributes['id'], $this->onActionIds))) { | |
| 476 | 472 | // Id is being used! |
| 477 | - if ($attributes['force'] != 'true') { | |
| 473 | + if ((isset($attributes['force'])) && ($attributes['force'] != 'true')) { | |
| 478 | 474 | $this->onActionIds[] = (int) $attributes['id']; |
| 479 | 475 | } |
| 480 | 476 | // Get block code. |
| 481 | 477 | $block = CJTxTable::getInstance('block') |