Yup. Checking for existence of $self->{u}  (if we shortcircuit early
enough, we may not even have figured out who this was supposed to be).

But I can totally see someone misinterpreting that down the line. Adjusted
to:

    $err_addr ||= $self->{u}->email_raw if $self->{u}


On Fri, Apr 19, 2013 at 1:45 PM, Mark Smith <notifications@github.com>wrote:

> In cgi-bin/DW/EmailPost/Base.pm:
>
> > +sub find_error_address {
> > +    my ( $self ) = $_[0];
> > +    return unless $self->{u};
> > +
> > +    my $err_addr;
> > +    my $addrlist = LJ::Emailpost::Web::get_allowed_senders( $self->{u} );
> > +    my $from = $self->{from};
> > +    foreach my $allowed_sender ( keys %$addrlist ) {
> > +        if ( lc $from eq lc $allowed_sender &&
> > +                $addrlist->{$allowed_sender}->{get_errors} ) {
> > +            $err_addr = $from;
> > +            last;
> > +        }
> > +    }
> > +
> > +    $err_addr = $self->{u}->email_raw if ! $err_addr && $self->{u};
>
> Negation binds tighter than &&. Just making sure you want it to be (!$err_addr)
> && $self->{u}.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dreamwidth/dw-free/pull/346/files#r3868187>
> .
>