Parse error after activation
-
Parse error: syntax error, unexpected ‘[‘, expecting ‘)’ in /wp-content/plugins/ifttt-instagram-gallery/public/class-ifttt-instagram-gallery.php on line 313
-
Thanks for your post! I will have a closer look today. Which PHP version do you use?
Thanks for your quick reply! I am using PHP5.
I used a syntax which came up with PHP 5.4. But I fixed the issue and published a new version of the plugin (1.0.1). Could you try it and let me know whether it works or not?
Thanks again!
Bj?rnHi, Thanks for working on this. I updated to 1.0.1. Now I’m seeing:
Parse error: syntax error, unexpected ‘:’ in /wp-content/plugins/ifttt-instagram-gallery/public/class-ifttt-instagram-gallery-widget.php on line 66
Thanks again for this hint. I fixed this in version 1.0.2 which is available now.
Thank you for the update. The plugin is now activated successfully with no errors. However, my gallery is not loading.
I tried adding the widget to the sidebar and also using the short code. You can see I have posts sent from IFTTT with the tag ifttt_wordpress_bridge. Thank you for looking at this!The screenshot of the recipe was not correct. The tag has to be ‘ifttt_bridge’. I’m very sorry! I updated the screenshot.
I’ve updated my tag to ifttt_bridge but the plugin is no longer working for me.
Warning: Invalid argument supplied for foreach() in /wp-content/plugins/ifttt-bridge/admin/class-ifttt-bridge-admin.php on line 110This time I don’t know what happens. Can you find out more about the variable $log in line 110 of /wp-content/plugins/ifttt-bridge/admin/class-ifttt-bridge-admin.php? You could add the following above this line.
var_dump($log)
;Then there should be some output on the admin page wich could give us a hint.
Thanks for continuing to help me, bjoerne!
Here is the dump of $log:string(5514) “a:30:{i:0;a:3:{s:4:”time”;i:1409448982;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:1;a:3:{s:4:”time”;i:1409448982;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:2;a:3:{s:4:”time”;i:1409448983;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:3;a:3:{s:4:”time”;i:1409448983;s:5:”level”;s:4:”info”;s:7:”message”;s:457:”Received data:
title: bkrumbles : The view at Daily Refresher is very nice
description: <div><img src=’https://scontent-b.cdninstagram.com/hphotos-xaf1/t51.2885-15/10601823_279773672228800_1216276109_n.jpg’ style=’max-width:600px;’ />
<div>via bkrumbles
August 30, 2014 at 09:27PM</div></div>
post_status: publish
categories: instagram, nearby
mt_keywords: instagram, nearby, ifttt_bridge”;}i:4;a:3:{s:4:”time”;i:1409448983;s:5:”level”;s:5:”error”;s:7:”message”;s:56:”An error occurred: Unexpected response code for url ”: “;}i:5;a:3:{s:4:”time”;i:1409448989;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:6;a:3:{s:4:”time”;i:1409448989;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:7;a:3:{s:4:”time”;i:1409448990;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:8;a:3:{s:4:”time”;i:1409448990;s:5:”level”;s:4:”info”;s:7:”message”;s:440:”Received data:
title: bradym888 : Seeing Magic Moo tonight!
description: <div><img src=’https://scontent-b.cdninstagram.com/hphotos-xpa1/t51.2885-15/927151_807626115925742_1468002774_n.jpg’ style=’max-width:600px;’ />
<div>via bradym888
August 30, 2014 at 09:34PM</div></div>
post_status: publish
categories: instagram, nearby
mt_keywords: instagram, nearby, ifttt_bridge”;}i:9;a:3:{s:4:”time”;i:1409448990;s:5:”level”;s:5:”error”;s:7:”message”;s:56:”An error occurred: Unexpected response code for url ”: “;}i:10;a:3:{s:4:”time”;i:1409448995;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:11;a:3:{s:4:”time”;i:1409448995;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:12;a:3:{s:4:”time”;i:1409448996;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:13;a:3:{s:4:”time”;i:1409448996;s:5:”level”;s:4:”info”;s:7:”message”;s:411:”Received data:
title: livadas :
description: <div><img src=’https://scontent-a.cdninstagram.com/hphotos-xaf1/t51.2885-15/10666045_542370775864364_196317819_n.jpg’ style=’max-width:600px;’ />
<div>via livadas
August 30, 2014 at 09:35PM</div></div>
post_status: publish
categories: instagram, nearby
mt_keywords: instagram, nearby, ifttt_bridge”;}i:14;a:3:{s:4:”time”;i:1409448996;s:5:”level”;s:5:”error”;s:7:”message”;s:56:”An error occurred: Unexpected response code for url ”: “;}i:15;a:3:{s:4:”time”;i:1409451027;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:16;a:3:{s:4:”time”;i:1409451027;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:17;a:3:{s:4:”time”;i:1409451028;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:18;a:3:{s:4:”time”;i:1409451028;s:5:”level”;s:4:”info”;s:7:”message”;s:596:”Received data:
title: mskatrinalim : Yeah… So this happened… Biscuits, @fieldroast apple-sage vegan sausage, peppers, onions and chickpea gravy #vegan #whatveganseat #veganfoodshare #veganlatenightfood #fatkid
description: <div><img src=’https://scontent-b.cdninstagram.com/hphotos-xfp1/t51.2885-15/891460_255080458034449_484102132_n.jpg’ style=’max-width:600px;’ />
<div>via mskatrinalim
August 30, 2014 at 09:36PM</div></div>
post_status: publish
categories: instagram, nearby
mt_keywords: instagram, nearby, ifttt_bridge”;}i:19;a:3:{s:4:”time”;i:1409451028;s:5:”level”;s:5:”error”;s:7:”message”;s:56:”An error occurred: Unexpected response code for url ”: “;}i:20;a:3:{s:4:”time”;i:1409451030;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:21;a:3:{s:4:”time”;i:1409451030;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:22;a:3:{s:4:”time”;i:1409451031;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:23;a:3:{s:4:”time”;i:1409451031;s:5:”level”;s:4:”info”;s:7:”message”;s:449:”Received data:
title: bizzmaaah : Wedding crafting hard. @rodeobot
description: <div><img src=’https://scontent-a.cdninstagram.com/hphotos-xaf1/t51.2885-15/10616872_305473026318468_1128097440_n.jpg’ style=’max-width:600px;’ />
<div>via bizzmaaah
August 30, 2014 at 09:48PM</div></div>
post_status: publish
categories: instagram, nearby
mt_keywords: instagram, nearby, ifttt_bridge”;}i:24;a:3:{s:4:”time”;i:1409451031;s:5:”level”;s:5:”error”;s:7:”message”;s:56:”An error occurred: Unexpected response code for url ”: “;}i:25;a:3:{s:4:”time”;i:1409451034;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:26;a:3:{s:4:”time”;i:1409451034;s:5:”level”;s:4:”info”;s:7:”message”;s:44:”Method metaWeblog.getCategories not relevant”;}i:27;a:3:{s:4:”time”;i:1409451035;s:5:”level”;s:4:”info”;s:7:”message”;s:20:”xmlrpc call received”;}i:28;a:3:{s:4:”time”;i:1409451035;s:5:”level”;s:4:”info”;s:7:”message”;s:473:”Received data:
title: rachelgonzalez1 : Wedding fun”<b>Warning</b>: Invalid argument supplied for foreach() in <b>/wp-content/plugins/ifttt-bridge/admin/class-ifttt-bridge-admin.php</b> on line <b>111</b>
Hi!
The log you posted ends suddenly at a quote. That leeds to an error because the log is not a correct serialized value. It can’t be unserialized by WordPress and is, at the line of code you mentioned, a string instead of an array.
I found a lot about issues with quotes and serialization on the web, but I myself don’t have problems with it. Maybe it’s again something which has been fixed in newer PHP versions.
Can you give me your exact PHP version? You can find it out by loading a PHP file with the following content on your webserver and invoking it:<?php phpinfo();
If you want to get rid of this error you can use the following database script:
DELETE FROM wp_options WHERE option_name = "ifttt_bridge_log";
This removes the log from the database. The log is recreated automatically when there is something logged. You could remove the log and play around with the test request feature of the bridge. Maybe you can find out more, e.g. if there are Instagram images which work fine and which ones break the code.
Thanks for you patience and passion to get this running ??
Hi!
I updated the ifttt-bridge plugin. The log didn’t work anymore after it had been emptied. I don’t think that this is connected to your problem, but it makes sense to update anyway.
Regards
Bj?rn
- The topic ‘Parse error after activation’ is closed to new replies.