What's on line 526 of that file?
Can you please reupload the file advanced_plugins.php?
Delete the file advanced_plugins.php from the inc/plugins directory.
Download the advanced_plugins mod again.
Then try to install again.
That's the easiest way of fixing it
Yes. This seems like a broken download. I guess you are downloading it from the mybb mods web site?