mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 11:29:24 -04:00
Fix for ticket 1004: Replace all uses of split with explode (none actually required regular expressions). Thanks to Brian Hartsock for providing a patch!
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user