Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: [gentoo-user] reading php file code in text editor
Date: Wed, 23 Jun 2010 07:03:55
Message-Id: AANLkTin7DSBYxSADgVuDHj3tqLVifOsb4GUrIqrzA4sP@mail.gmail.com
1 I am looking at some php files which are causing parsing errors in Drupal, like:
2 =============================================
3 Warning: Unexpected character in input: ' in
4 /var/www/htdocs/sites/all/themes/fusion/fusion_core/template.php on
5 line 178
6 Warning: Unexpected character in input: ' in
7 /var/www/htdocs/sites/all/themes/fusion/fusion_core/template.php on
8 line 178
9 Warning: Unexpected character in input: ' in
10 /var/www/htdocs/sites/all/themes/fusion/fusion_core/template.php on
11 line 178
12 =============================================
13 and so on.
14
15 When I view the file using a text editor I see a number of lines which
16 are shown as binary characters ... should it be like this?
17 =============================================
18 $dimensions = !empty($node->height) && !empty($node->width) &&
19 !empty($node->length); // Hide dimensions if empty
20 $vars['fusion_uc_dimensions'] = ($dimensions) ?
21 drupal_render($node->content['dimensions']) : '';
22 if ($vars['fusion_uc_dimensions'] == '') {
23 unset($node->content['dimensions']);
24 }
25 $list_price = !empty($node->list_price) && $node->list_price > 0;
26 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
27 =============================================
28
29 Another file that also gives the same parse error ends like this:
30 =============================================
31 if ($enabled_themes == 0) {
32 drupal_set_message(t('Skinr has detected that none of your
33 themes are enabled. This is likely related the Drupal bug: <a
34 href="http://drupal.org/node/305653">Themes disabled during
35 update</a>. Please re-enable your theme to continue using Skinr.'),
36 'warning', FALSE);
37 }
38
39 // Only add submit handler once.
40 eval('$element =& $form'. $form_settings['submit_handler_attach^@^@^@^@^@
41 ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
42 =============================================
43 Is this caused by some php escape character error in these files, am I
44 missing some USE flag on my php package, or is there something else
45 wrong?
46
47 BTW, what I'd rather fix is the error reported on the last lines,
48 although I am interested as to why php files show this binary string
49 at the end.
50 --
51 Regards,
52 Mick

Replies

Subject Author
[gentoo-user] Re: reading php file code in text editor Mick <michaelkintzios@×××××.com>
Re: [gentoo-user] reading php file code in text editor Stroller <stroller@××××××××××××××××××.uk>