Just started using CI - very nice :)
A totally default installation gives a warning of:
A PHP Error was encountered
Message: preg_match() expects parameter 2 to be string, array given
Line Number: 93
when using the scaffolding.
Tracking back through the code I see the ‘view’ model in scaffolding uses :
<?php echo anchor(array($base_uri, ‘edit’, $row->$primary), $scaff_edit); ?>
Would it be useful to add 2 lines of code into the anchor() function in the URI helper as follows:
function anchor($uri = ‘’, $title = ‘’, $attributes = ‘’)
$uri=implode(’‘,$uri); //—EDIT—:- or perhaps I meant implode on ‘/’ ! I think I probably did :)
.... existing code ...
This would stop the warning message. I don’t know if this would affect the code in ways I haven’t thought about though !