-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set Facebook App ID as optional #4
Comments
Actually, this occurs because the Facebook function isn't checking the $admins argument for an array and its values before iterate. Optimizer.php class file with fixes:
I'll try to make a PR soon. |
O problema aqui foi confundir os dados. Observando o método você deve informar um ou outro parâmetro e respeitar seus formatos. ->facebook("23434234") para APPID Coloquei uma verificação a mais no admins para validar o correto formato sem o erro. Agora se ocorrer o componente vai omitir a informação. |
Not always when we are developing a website it has an App ID and even in production can happen not to have.
So I suggest you leave fb: app_id receive null value, so we do not have to leave a random value like 9999999999999999 to print
<meta property="fb:app_id" content="9999999999999999"/>
both in development and in production if that's the case, because if I do not set a value for Facebook App ID it causes me the following error:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\project-folder\vendor\coffeecode\optimizer\src\Optimizer.php on line 134
The text was updated successfully, but these errors were encountered: