cakephp/cakephp — pull request #1338 by aymericderbois (2013-06-08 23:03:09+00:00)
Title: Fix bug in Xml::_createChild Method

Hi !
===

Problem :
=======

Method : Xml::_createChild();

Example :
```php
$xml = array(
'tag' => array(
'@' => 0,
'@test' => 'A test'
)
);
$obj = Xml::fromArray($xml);
$obj->asXML()
```

Output is :
```

```

That must be :
```

0
```

Why ?
=====

```php
if ($childValue) {
$child->appendChild($dom->createTextNode($childValue));
}
```
When `$childValue` equal "0", it's like `false`

Solution :
==========

Check if `$childValue` is null, because it's the default value of `$childValue`
```php
if (!is_null($childValue)) {
$child->appendChild($dom->createTextNode($childValue));
}
```