[development] Missing ?> in 4.7.x Files

Konstantin Käfer kkaefer at gmail.com
Fri Aug 18 13:47:16 UTC 2006


This is absolutely correct. We are omitting the closing ?> to prevent
"headers already sent" problems caused by spaces after the ?>. The PHP
manual states, that these are optional.

2006/8/18, inkfree press <inkfree at gmail.com>:
>
>
> I am trying to determine if something is happening to unpacked zip files
> OMM, or if there is something else going on.
>
> After experiencing some odd errors, it came to my attention that certain
> files in the unzipped 4.7.2 and 4.7.3 releases are missing a final ending
> "?>" PHP closing tag.
>
> For example, 'index.php' looks exactly like this (4.7.3):
>
> =======<code>
>
> <?php
> // $Id: index.php,v 1.90 2006/01/27 18:51:51 dries Exp $
>
> /**
> * @file
> * The PHP page that serves all page requests on a Drupal installation.
> *
> * The routines here dispatch control to the appropriate handler, which
> then
> * prints the appropriate page.
> */
>
> require_once './includes/bootstrap.inc';
> drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
>
> $return = menu_execute_active_handler();
> switch ($return) {
>   case MENU_NOT_FOUND:
>     drupal_not_found();
>     break;
>   case MENU_ACCESS_DENIED:
>     drupal_access_denied();
>     break;
>   case MENU_SITE_OFFLINE:
>     drupal_site_offline();
>     break;
>   default:
>     // Print any value (including an empty string) except NULL or
> undefined:
>     if (isset($return)) {
>       print theme('page', $return);
>     }
>     break;
> }
>
> drupal_page_footer();
>
> =======</code>
>
> That document ends (OMM) with the final code line at line 34, then is
> followed by two blank lines.  The final line is numbered 36, that is, but
> 35
> and 36 are line feeds/new lines only.  [Note the missing ?> after that
> final
> function call.]
>
>
> Is this something happening during MY unzip, or is this also true for
> others?
>
>
> I really find this interesting, and will clearly explore any issues which
> might be affecting my machine.
>
> Thanks for any insight.
> --
> inkfree
>
>
> P.S.  'My machine' =  Mac OS X.3.9 (Panther) and I've been unpacking and
> testing Drupal here since before version 4.6, with no problems at all.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060818/5bcf8be4/attachment.htm


More information about the development mailing list