Added tests for shared functions, fixed small issues

pull/22/head
Aleksander Machniak 12 years ago
parent e077c189bb
commit e8be303af3

@ -108,11 +108,11 @@ function slashify($str)
/** /**
* Remove slash at the end of the string * Remove slashes at the end of the string
*/ */
function unslashify($str) function unslashify($str)
{ {
return preg_replace('/\/$/', '', $str); return preg_replace('/\/+$/', '', $str);
} }
@ -231,7 +231,7 @@ function array_keys_recursive($array)
{ {
$keys = array(); $keys = array();
if (!empty($array)) { if (!empty($array) && is_array($array)) {
foreach ($array as $key => $child) { foreach ($array as $key => $child) {
$keys[] = $key; $keys[] = $key;
foreach (array_keys_recursive($child) as $val) { foreach (array_keys_recursive($child) as $val) {
@ -255,7 +255,7 @@ function asciiwords($str, $css_id = false, $replace_with = '')
/** /**
* Remove single and double quotes from given string * Remove single and double quotes from a given string
* *
* @param string Input value * @param string Input value
* *

@ -7,6 +7,7 @@
<file>MailDecode.php</file> <file>MailDecode.php</file>
<file>MailFunc.php</file> <file>MailFunc.php</file>
<file>ModCss.php</file> <file>ModCss.php</file>
<file>Shared.php</file>
<file>Utils.php</file> <file>Utils.php</file>
<file>VCards.php</file> <file>VCards.php</file>
</testsuite> </testsuite>

Loading…
Cancel
Save