Title: Error when using PHP 7.1
Last modified: May 24, 2017

---

# Error when using PHP 7.1

 *  [wpger](https://wordpress.org/support/users/fogruen/)
 * (@fogruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/)
 * I just updated to php version 7.1 and now I’m getting the following error messages
   from the shariff wrapper widget in my sidebar:
 * Warning: Illegal string offset ‘media’ in /homepages/…/…/htdocs/blog/wp-content/
   plugins/shariff/shariff.php on line 588
 * Warning: array_merge(): Argument #2 is not an array in /homepages/…/…/htdocs/
   blog/wp-content/plugins/shariff/shariff.php on line 592
 * Warning: array_filter() expects parameter 1 to be array, null given in /homepages/…/…/
   htdocs/blog/wp-content/plugins/shariff/shariff.php on line 602
 * Strangely only on the homepage of my wp theme twenty fourteen. On all archives
   and post pages the display is fine.
    -  This topic was modified 9 years ago by [wpger](https://wordpress.org/support/users/fogruen/).

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9162944)
 * Hi wp-newbie,
 * the media attribute is the Pinterest-Image-URL. Do you have the media= attribute
   in your Widget shortcode? If so, try removing it. Also please check the Pinterest-
   Image setting in the general plugin settings. Do you have anything entered there?
 * Cheers
    JP
 * P.S.: The PHP warnings are only displayed, if you have WP_DEBUG set to true. 
   If you disable it again, the message will disappear. Of course we still will 
   try to find out the issue here, just as a quick solution.
 *  Thread Starter [wpger](https://wordpress.org/support/users/fogruen/)
 * (@fogruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9163021)
 * I’m afraid I don’t know exactly what you mean by „media=attribute“. I just dragged
   the widget to the sidebar. Only the field „shorttag“ is filled out with [shariff].
   All other fields are empty. The field for Pinterest Image-settings in the general
   plugin settings is empty too. And: the error only occurs in the content sidebar(
   right) on the homepage. The same widget works fine on the left sidebar and all
   other pages or posts.
 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9163124)
 * Ok, then there is nothing more you can do on your end right now (except setting
   WP_DEBUG to false). I’ll see, if I can find out what is causing this warning.
 * Cheers,
    JP
 *  Thread Starter [wpger](https://wordpress.org/support/users/fogruen/)
 * (@fogruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9163138)
 * Thank you. Setting WP_DEBUG to false would probably not solve the problem because
   the buttons ain’t showing up at all. That would only result in a blank widget.
 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9163151)
 * Give it a try 🙂
 *  [fogger](https://wordpress.org/support/users/fgruen/)
 * (@fgruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182642)
 * Hallo JP,
    gibt es schon etwas Neues zu den Fehlermeldungen? Wir haben den Effekt
   auf einzelnen Posts. (Beispiel [hier am Fuß der Seite](https://www.digitalzimmer.de/artikel/wissen/kaufberatung-smarte-ueberwachungskameras/)).
   Wenn es keine Lösung dafür gibt, müssen wir wohl einen Rollback auf PHP 7.0.3
   durchführen.
 * Beste Grüße aus dem Digitalzimmer
    F. Grün
    -  This reply was modified 9 years ago by [fogger](https://wordpress.org/support/users/fgruen/).
    -  This reply was modified 9 years ago by [fogger](https://wordpress.org/support/users/fgruen/).
    -  This reply was modified 9 years ago by [fogger](https://wordpress.org/support/users/fgruen/).
 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182775)
 * Hallo F.Grün,
 * was passiert, wenn du WP_DEBUG auf false setzt? (Der Debugmodus sollte auf Live-
   Systemen nie dauerhaft an sein).
 * Darüber hinaus: Geh einmal bitte in den Bearbeitungsmodus des betroffenen Beitrags.
   Was genau steht in den zwei Feldern bei den Shariff-Einstellungen? (Pinterest-
   Bild und Shortcode)
 * Viele Grüße
    JP
 *  [fogger](https://wordpress.org/support/users/fgruen/)
 * (@fgruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182781)
 * PS. Die Meldungen sind ausgeblendet (über display_errors = Off in der php.ini).
   Der Fehler macht sich jedoch bemerkbar, weil auf den betroffenen Seiten keine
   Shariff-Buttons angezeigt werden. Auf allen anderen schon. Ich habe noch keine
   Systematik entdecken können, warum manche Seiten betroffen sind und andere nicht.
 *  [fogger](https://wordpress.org/support/users/fgruen/)
 * (@fgruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182801)
 * 1. Im Feld Pinterest-Bild steht die URL zu einem Bild aus dem Beitrag. Wenn ich
   sie entferne, sind die Buttons wieder da.
 * 2. Im Feld Shortcode steht gar nichts bzw. grau der Default-Wert [shariff]
 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182882)
 * Hallo fgruen,
 * es liegt definitiv an dem Pitnerest-Eintrag: Wie genau lautet der Link?
 * Viele Grüße
    JP
 *  [fogger](https://wordpress.org/support/users/fgruen/)
 * (@fgruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9182894)
 * Der Link zum Pinterest-Bild lautet:
    [https://www.digitalzimmer.de/wp-content/uploads/2017/05/Smart-Cameras.jpg](https://www.digitalzimmer.de/wp-content/uploads/2017/05/Smart-Cameras.jpg)
 * Beste Grüße F. Grün
 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9183010)
 * Hallo fgruen,
 * alles klar, ich habe den Fehler gefunden. Hat einen Moment gedauert, weil ich
   ihn unbewusst in der Entwicklungsversion schon gefixed hatte. Bis ein neues Update
   erscheint, kannst du den Fehler folgendermaßen umgehen:
 * – Lass das Pinterest-Feld leer.
    – Trage das Bild für Pinterest stattdessen im
   Shortcode ein. Also z.B. so:
 * `[shariff media="https://www.digitalzimmer.de/wp-content/uploads/2017/05/Smart-
   Cameras.jpg"]`
 * Viele Grüße,
    JP
 *  [fogger](https://wordpress.org/support/users/fgruen/)
 * (@fgruen)
 * [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9183087)
 * Vielen Dank!
    Und beste Grüße F. Grün

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error when using PHP 7.1’ is closed to new replies.

 * ![](https://ps.w.org/shariff/assets/icon.svg?rev=2006307)
 * [Shariff Wrapper](https://wordpress.org/plugins/shariff/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shariff/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shariff/)
 * [Active Topics](https://wordpress.org/support/plugin/shariff/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shariff/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shariff/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [fogger](https://wordpress.org/support/users/fgruen/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/error-when-using-php-7-1/#post-9183087)
 * Status: not resolved