Model->query()に単純なwhereに array( where=>arrat('aaa', '>', 100) )を渡したら、
以下のようなエラーが出ました。
RuntimeException [ Error ]:
Object class "Orm\Query" could not be converted to string or sanitized as ArrayAccess. Whitelist it in security.whitelisted_classes in app/config/config.php to allow it to be passed unchecked.
調べて app/config/config.php に
'whitelisted_classes' => array(
'Fuel\\Core\\Response',
'Fuel\\Core\\View',
'Fuel\\Core\\ViewModel',
'Closure',
'Orm\\Query' <<<<
),
を追加することで通るようになりました。
動作としては問題ないのですが、セキュリティ的に問題がある使い方になるのでしょうか?
値は上記は100となっていますが、通常は Input::post() で取得します。
また他に正しい使い方があるようでしたら、教えていただけると助かります。
よろしくお願いいたします。
// Take