Permalink
Browse files

Merge pull request #25 from philix/bugfix

Removing warnings and fatals from php-lib/core.php
  • Loading branch information...
2 parents 139f710 + a55d174 commit 471ed9c8c9890098034c6d9b9587cd6374911566 @Swahvay Swahvay committed Nov 8, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 php-lib/core.php
View
@@ -22,7 +22,9 @@
abstract public function setAttribute($attr, $val);
abstract public function categoryOf($cat);
abstract public function __toString();
- abstract protected static function &__xhpAttributeDeclaration();
+ // PHP Strict Standards define that static function should not be declared
+ // abstract.
+ // abstract protected static function &__xhpAttributeDeclaration();
abstract protected function &__xhpCategoryDeclaration();
abstract protected function &__xhpChildrenDeclaration();
@@ -555,7 +557,11 @@ protected function &__xhpChildrenDeclaration() {
// Validate our children
$this->__flushElementChildren();
if (:x:base::$ENABLE_VALIDATION) {
- $this->validateChildren();
+ try {
+ $this->validateChildren();
+ } catch (Exception $e) {
+ trigger_error($e->getMessage(), E_USER_ERROR);
+ }
}
// Render to string

0 comments on commit 471ed9c

Please sign in to comment.