File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 77
88use function array_change_key_case ;
99use function assert ;
10- use function is_resource ;
1110use function preg_match ;
1211use function str_replace ;
1312use function strpos ;
@@ -207,13 +206,12 @@ protected function _getPortableForeignKeyRuleDef($def)
207206 protected function _getPortableViewDefinition ($ view )
208207 {
209208 $ view = array_change_key_case ($ view , CASE_LOWER );
210- // sadly this still segfaults on PDO_IBM, see http://pecl.php.net/bugs/bug.php?id=17199
211- //$view['text'] = (is_resource($view['text']) ? stream_get_contents($view['text']) : $view['text']);
212- if (! is_resource ($ view ['text ' ])) {
213- $ pos = strpos ($ view ['text ' ], ' AS ' );
209+
210+ $ sql = '' ;
211+ $ pos = strpos ($ view ['text ' ], ' AS ' );
212+
213+ if ($ pos !== false ) {
214214 $ sql = substr ($ view ['text ' ], $ pos + 4 );
215- } else {
216- $ sql = '' ;
217215 }
218216
219217 return new View ($ view ['name ' ], $ sql );
You can’t perform that action at this time.
0 commit comments