Helperをvimで編集してると、swapファイル(.swp)が取り込まれて表示される。
時々出てて、「なにこれ〜〜???」と。出たり出なかったりしてた。で、よくよく目をこらすと、一番上に「b0VIM」とかある。
・・・ひょっとして、これvimのswapファイル?
試しにvimを閉じて.swpファイルが無くなると、直った。・・・ありえねぇ。
↓原因。
akelos/lib/AkActionController.php :
<?php ... function getApplicationHelpers() { $helper_names = array(); if ($this->app_helpers == 'all'){ $available_helpers = Ak::dir(AK_HELPERS_DIR,array('dirs'=>false)); $helper_names = array(); foreach ($available_helpers as $available_helper){ // ここで無頓着に突っ込んでるから・・・。 $helper_names[AK_HELPERS_DIR.DS.$available_helper] = AkInflector::classify(substr($available_helper,0,-10)); } ...
そんな感じです。
で、一々閉じるのも面倒なので、QuickHack。
foreach ($available_helpers as $available_helper){ + if (!preg_match('/^\w+\.php$/m', $available_helper)) { + continue; + } $helper_names[AK_HELPERS_DIR.DS.$available_helper] = AkInflector::classify(substr($available_helper,0,-10)); }