$partner
is supposed to be an array of strings, but it's not: you are defining it as a string using HEREDOC syntax.
The first character of the string is the double quote, which the regex engine treats as the delimiter. Therefore when the next unescaped double quote is encountered:
"#<h1 class=\"logo\"(.*?)</h1>#s",
^
the engine assumes that whatever follows must be regex modifiers. Since ,
is not a valid modifier the result is an error.
The correct way to do it is
$partner = array(
"#<h1 class=\"logo\"(.*?)</h1>#s",
"#<h2 class=\"hidden\"(.*?)</h2>#s",
);
and used as
$str = preg_replace($partner, '', $str);