diff options
author | Andy Staudacher <andy.st@gmail.com> | 2010-02-06 13:05:44 -0800 |
---|---|---|
committer | Andy Staudacher <andy.st@gmail.com> | 2010-02-06 13:05:44 -0800 |
commit | 7099fc71f11ef8d3dd613d96a04a4824a827c714 (patch) | |
tree | 56a0cdde8af26c66b27095f15107294c9c75a52c /modules/user/tests | |
parent | 5c0c33782d7dd3556adecb9593f25f2cff06401a (diff) |
Fix for ticket 1004: Replace all uses of split with explode (none actually required regular expressions). Thanks to Brian Hartsock for providing a patch!
Diffstat (limited to 'modules/user/tests')
-rw-r--r-- | modules/user/tests/No_Direct_ORM_Access_Test.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/tests/No_Direct_ORM_Access_Test.php b/modules/user/tests/No_Direct_ORM_Access_Test.php index c372258e..eb7f09b0 100644 --- a/modules/user/tests/No_Direct_ORM_Access_Test.php +++ b/modules/user/tests/No_Direct_ORM_Access_Test.php @@ -31,7 +31,7 @@ class No_Direct_ORM_Access_Test extends Gallery_Unit_Test_Case { //if (basename(dirname($file)) == "helpers") { $file_as_string = file_get_contents($file); if (preg_match("/ORM::factory\\(\"user\"/", $file_as_string)) { - foreach (split("\n", $file_as_string) as $l => $line) { + foreach (explode("\n", $file_as_string) as $l => $line) { if (preg_match('/ORM::factory\\(\"user\"/', $line)) { $errors[] = "$file($l) => $line"; } @@ -54,7 +54,7 @@ class No_Direct_ORM_Access_Test extends Gallery_Unit_Test_Case { foreach ($dir as $file) { $file_as_string = file_get_contents($file); if (preg_match("/ORM::factory\\(\"group\"/", $file_as_string)) { - foreach (split("\n", $file_as_string) as $l => $line) { + foreach (explode("\n", $file_as_string) as $l => $line) { if (preg_match('/ORM::factory\\(\"group\"/', $line)) { $errors[] = "$file($l) => $line"; } |