File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,15 @@ protected function getDescriptorForValidation()
2929 foreach ($ descriptor ->resources as &$ resource ) {
3030 if (is_object ($ resource )) {
3131 $ resource = clone $ resource ;
32- if (isset ($ resource ->path ) && is_array ($ resource ->path )) {
33- foreach ($ resource ->path as &$ url ) {
34- if (is_string ($ url )) {
35- $ url = 'file:// ' .$ url ;
32+ if (isset ($ resource ->path )) {
33+ if (is_array ($ resource ->path )) {
34+ foreach ($ resource ->path as &$ url ) {
35+ if (is_string ($ url )) {
36+ $ url = 'file:// ' .$ url ;
37+ }
3638 }
39+ } elseif (is_string ($ resource ->path )) {
40+ $ resource ->path .= 'file:// ' .$ resource ->path ;
3741 }
3842 }
3943 }
Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ protected function getResourceClass()
4444 protected function validateKeys ()
4545 {
4646 $ resourceClass = $ this ->getResourceClass ();
47- foreach ($ this ->descriptor ->path as $ dataSource ) {
47+ // DS: path can be a string or an array
48+ $ sources = is_array ($ this ->descriptor ->path ) ? $ this ->descriptor ->path : array ($ this ->descriptor ->path );
49+ foreach ($ sources as $ dataSource ) {
4850 foreach ($ resourceClass ::validateDataSource ($ dataSource , $ this ->basePath ) as $ error ) {
4951 $ this ->errors [] = $ error ;
5052 }
You can’t perform that action at this time.
0 commit comments