Forum Moderators: coopster

Message Too Old, No Replies

T constant encapsed string

         

tsisul

1:44 am on May 29, 2011 (gmt 0)

10+ Year Member



I accidentally created an error and can't figure out how to get rid of it. Any help would really be appreciated.

The error I'm receiving is below:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /functions.php on line 23


And here's a little more than the first 23 lines of code for functions.php:


<?php
// Start the engine
require_once(TEMPLATEPATH.'/lib/init.php');

// Add new image sizes
add_image_size('Slideshow', 500, 260, TRUE);
add_image_size('Mini', 90, 90, TRUE);

// Add widgeted footer section
add_action('genesis_before_footer', 'metric_include_footer_widgets');
function metric_include_footer_widgets() {
require(CHILD_DIR.'/footer-widgeted.php');
}

// Footer custom
add_filter('genesis_footer_creds_text', 'custom_footer_creds_text');
function custom_footer_creds_text($creds) {
$creds = '' . get_bloginfo('&#170 Merchant Financing') . ' &bull; Built by Update Content ' . '';
return $creds;
}

// Customizes go to top text
add_filter('genesis_footer_backtotop_text', 'footer_backtotop_filter');
function footer_backtotop_filter($backtotop) {
$backtotop = '[footer_backtotop text="Top of Page"]';
return $backtotop;
}

What I don't get is that the code I was messing with isn't on line 23. It was this code...

// Footer custom
add_filter('genesis_footer_creds_text', 'custom_footer_creds_text');
function custom_footer_creds_text($creds) {
$creds = '' . get_bloginfo('&#170 Merchant Financing') . ' &bull; Built by Update Content ' . '';
return $creds;
}

Specifically the code in bold. Any suggestions?

Sincerely,


-Ted

tsisul

3:16 am on May 29, 2011 (gmt 0)

10+ Year Member



I was able to fix the issue by finding a backup file. I didn't think I had one. Phew!

rocknbil

6:01 pm on May 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You probably had a quote missing. When that happens, PHP (or any parser) will look for the closing quote until it can't make sense of it any more, slurping up any parsable code in between - so it's quite common for an error to occur several, or many lines later. Perl is helpful in this regard - "might be a runaway " " " starting on line 15".