Skip to content

Commit

Permalink
Merge branch '1.2.0' of https://github.com/phalcon/cphalcon into 1.2.0
Browse files Browse the repository at this point in the history
Conflicts:
	ext/forms/element.c
  • Loading branch information
phalcon committed May 27, 2013
2 parents 8197480 + 31785fd commit c8ae2ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions ext/forms/element.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,15 @@ PHP_METHOD(Phalcon_Forms_Element, getAttributes){

PHALCON_OBS_VAR(attributes);
phalcon_read_property_this(&attributes, this_ptr, SL("_attributes"), PH_NOISY_CC);
if (Z_TYPE_P(attributes) != IS_ARRAY) {

if (Z_TYPE_P(attributes) != IS_ARRAY) {

PHALCON_INIT_VAR(empty_array);
array_init(empty_array);

RETURN_CTOR(empty_array);
}

RETURN_CCTOR(attributes);
}

Expand Down
2 changes: 1 addition & 1 deletion unit-tests/FormsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testFormElementEmpty()
$element = new Text("name");

$this->assertEquals($element->getLabel(), null);
$this->assertEquals($element->getAttributes(), null);
$this->assertEquals($element->getAttributes(), array());
}

public function testFormElement()
Expand Down
2 changes: 1 addition & 1 deletion unit-tests/ModelsRelationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,4 @@ public function _executeTestsRenamed($di)

}

}
}
2 changes: 2 additions & 0 deletions unit-tests/RouterMvcTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ public function testRouter()

$router->add("/posts/delete/{id}", "Posts::delete");

$router->add("/show/{id:video([0-9]+)}/{title:[a-z\-]+}", "Videos::show");

foreach ($tests as $n => $test) {
$this->_runTest($router, $test);
}
Expand Down

0 comments on commit c8ae2ca

Please sign in to comment.