• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

Unexpected T_DOUBLE_ARROW

I have some third party software that was working great until I added a mod to it. Now I get an error or unexpected T_DOUBLE_ARROW on line 193 on a diffrent page.  I don't get it the code below has worked great for months until now, now it pops an error. Can someone please take a look and see what's cause this on line 193?


186	array
187	(
188		'id' => 3,
189		'name' => 'Myspace',
190		'url' => 'myspace\.com',
191		'image' => false,
192		'import' => false,
193	),
194	array
195	(
196		'id' => 6,
197		'name' => 'Break',
198		'url' => 'break\.com',
199		'image' => true,
200		'import' => false,
201	),

Open in new window

0
mimoser
Asked:
mimoser
  • 3
  • 3
  • 2
  • +1
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
190            'url' => 'myspace\.com',

should be:

190            'url' => 'myspace.com',
or:
190            'url' => 'myspace\\.com',
0
 
ludofulopCommented:
i think that error is in other file...
0
 
mimoserAuthor Commented:
Here is a portion of the file I added. During troubleshooting I have managed to comment out this section, and my site works again. If I uncomment this section it gives me the error to the page I posted above.
$shared_dir  = realpath(dirname(dirname(__FILE__)))."/phpsnsshared/"; // Pet Mod only
$classes_dir = realpath(dirname(dirname(__FILE__)))."/phpsnsshared/classes/";
require_once($shared_dir."functions.php"); // Pet Mod only
require_once($shared_dir."ObjectSQL.class.php"); // Pet Mod only
require_once($classes_dir."snsVarsPlugin.php");
require_once($classes_dir."snsObject.php"); // Pet Mod only
require_once($classes_dir."snsUserLang.php"); // Pet Mod only
require_once($classes_dir."snsSendMail.php"); // Pet Mod only
require_once($classes_dir."snsSendMess.php"); // Pet Mod only
require_once("include/snsPetObject.php"); // this mod only
require_once("include/snsPetFunc.php"); // Pet Mod only
require_once("include/snsMembership.php"); // Pet Mod only
require_once("include/snsPetLinks.php"); // Pet Mod only
require_once("include/snsPetTransaction.php"); // Pet Mod only
require_once("include/snsPetBox.php"); // Pet Mod only
$oVars   = new snsPetVars();
$snsLang = new snsPetLang();

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ludofulopCommented:
please paste your full error here. There should be written the file name, in which you have error... check out line #193 in that file name. I believe that it's not the portion of the code you wrote in the question.
0
 
mimoserAuthor Commented:
Line #193 was the
), from my first post. That file has always worked fine and wasnt changed tonight. This new file is somehow making that file error out.

PHP Parse error:  syntax error, unexpected T_DOUBLE_ARROW in /public_html/include/settings/common.sett.php on line 193

I have done more trouble shooting commenting and uploading. My site works great with the three lines below commented out. If I allow them, it turns the homepage white, and give me the error about line 193.

$shared_dir  = realpath(dirname(dirname(__FILE__)))."/phpsnsshared/"; 
$classes_dir = realpath(dirname(dirname(__FILE__)))."/phpsnsshared/classes/";
//require_once($shared_dir."functions.php"); 
//require_once($shared_dir."ObjectSQL.class.php"); 
require_once($classes_dir."snsVarsPlugin.php");
require_once($classes_dir."snsObject.php"); 
require_once($classes_dir."snsUserLang.php"); 
require_once($classes_dir."snsSendMail.php"); 
require_once($classes_dir."snsSendMess.php"); 
require_once("include/snsPetObject.php"); 
require_once("include/snsPetFunc.php"); 
require_once("include/snsMembership.php"); 
require_once("include/snsPetLinks.php"); 
require_once("include/snsPetTransaction.php"); 
require_once("include/snsPetBox.php"); 
//$oVars   = new snsPetVars();
$snsLang = new snsPetLang();

Open in new window

0
 
Ray PaseurCommented:
@mimoser: The error on line 193 would be easier for us to isolate if you posted all the code so we could see the REAL LINE 193!
0
 
ludofulopCommented:
please include all the contents of the file /public_html/include/settings/common.sett.php
0
 
Ray PaseurCommented:
But since we have to guess until you post all the code, here is my guess...

You have an unterminated statement - missing a semicolon at the end.  Or you have some kind of construct, maybe in an IF statement, that unexpectedly brings PHP upon a double-arrow.  It is probably in one of the include scripts.

FWIW, I tried this, based on your original post, and it parses correctly.
<?php // RAY_temp_mimoser.php
error_reporting(E_ALL);
echo "<pre>\n";

$thing = array (
array
(
         'id' => 3,
         'name' => 'Myspace',
         'url' => 'myspace\.com',
         'image' => false,
         'import' => false,
 ),
array
(
         'id' => 6,
         'name' => 'Break',
         'url' => 'break\.com',
         'image' => true,
         'import' => false,
 ),
);

var_dump($thing);

Open in new window

0
 
Ray PaseurCommented:
I am kind of mystified here.  What was the fix?  I took EXACTLY what you posted and it worked.  How did changing the number of backslashes have an effect?  Please fill us in on the details, thanks. ~Ray
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
same feeling here. ...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now