Reputation: 3370
I have this line, but i don't know what to change to skip this error
$media_query = '@media screen and (max-width: ' . intval( Avada()->settings->get( 'side_header_break_point' ) ) - 32 . 'px)';
Upvotes: 0
Views: 477
Reputation: 272742
You need to pay attention to the order of operation as :
the dot operator has the same precedence as + and -, which can yield unexpected results.
So in your case you have 'maybe' formed two strings before applying the minus operation, to avoid this you need to add parenthesis like this :
'(max-width: ' . (intval( Avada()->settings->get( 'side_header_break_point' ) ) - 32) . 'px)';
You can learn more here : http://php.net/manual/fa/language.operators.precedence.php
Upvotes: 3