Checking if one of comparing Frames is an Unknown frame to keep them separate

This commit is contained in:
Aleksandr Bogdanov
2014-02-05 13:31:34 +01:00
parent 64f25c4fff
commit ba1f97e55f
+6
View File
@@ -233,6 +233,12 @@ class Frame implements Serializable
*/
public function equals(Frame $frame)
{
if(in_array('Unknown', array($this->getFile(), $frame->getFile())) ||
in_array(0, array($this->getLine(), $frame->getLine()))
) {
return false; //we need to keep untrackable frames separate
}
return $frame->getFile() == $this->getFile() && $frame->getLine() === $this->getLine();
}
}