Skip to content

Instantly share code, notes, and snippets.

@TikiTDO
Created September 17, 2013 14:09
Show Gist options
  • Save TikiTDO/6594810 to your computer and use it in GitHub Desktop.
Save TikiTDO/6594810 to your computer and use it in GitHub Desktop.
state = :init
n = 0
STDIN.each_line do |line|
n += 1
if state == :init
if line =~ /Creating default object from empty value/
state = :stack
next
end
elsif state == :stack
next if line =~ /PHP Stack trace:/
next if line =~ /PHP\s+\d+\./
state = :init
redo
end
puts "#{n}: #{line}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment