'intent-execution'];"; $pos=strpos($c,$target); if(!$pos){echo "TARGET NOT FOUND\n";exit;} $insert=$target."\n \$opus_r = opus_persistent_intents(\$msg, \$base); if (\$opus_r) return \$opus_r;"; $c=substr($c,0,$pos).$insert.substr($c,$pos+strlen($target)); file_put_contents($f,$c); echo shell_exec("php -l $f 2>&1 | head -1")."\n"; if(strpos(shell_exec("php -l $f 2>&1"),"No syntax")===false){ shell_exec("cd /opt/wevia-brain && git checkout -- $f"); echo "REVERTED (lint fail)\n"; }else{ echo "HOOKED OK\n"; }