example42/puppet-php — pull request #78 by mike-lerch (2014-12-31 03:44:58+00:00)
Title: iconv causes this to always return 200

The pipe to iconv causes the unless statement to always return 0, which means the pear package is not being installed.

Example of the issue:

Mainfest:
php::pear::module { "Net_GeoIP": use_package => 'no' }

Testing:
server:~ # pear info pear.php.net/Net_GeoIP | iconv -c
No information found for `pear.php.net/Net_GeoIP'
server:~ # echo $?
0
server:~ # pear info pear.php.net/Net_GeoIP
No information found for `pear.php.net/Net_GeoIP'
server:~ # echo $?
1

Before this change: Net_GeoIP is never installed
After this change: Net_GeoIP is installed