Page MenuHomePhabricator

<?PHP gives "has content before opening" false positive
Closed, ResolvedPublic

Description

14:20:29 Unhandled error:
Traceback (most recent call last):
  File "/srv/deployment/scap/scap/scap/cli.py", line 276, in run
    exit_status = app.main(extra_args)
  File "/srv/deployment/scap/scap/scap/main.py", line 417, in main
    return super(SyncDir, self).main(*extra_args)
  File "/srv/deployment/scap/scap/scap/main.py", line 45, in main
    self._before_cluster_sync()
  File "/srv/deployment/scap/scap/scap/main.py", line 430, in _before_cluster_sync
    tasks.check_valid_syntax(abspath)
  File "/srv/deployment/scap/scap/scap/tasks.py", line 93, in check_valid_syntax
    utils.check_php_opening_tag(abspath)
  File "/srv/deployment/scap/scap/scap/utils.py", line 531, in check_php_opening_tag
    % path
ValueError: /srv/mediawiki-staging/php-1.27.0-wmf.11/vendor/pear/mail/Mail/smtpmx.php has content before opening <?php tag
14:20:29 sync-dir failed: <ValueError> /srv/mediawiki-staging/php-1.27.0-wmf.11/vendor/pear/mail/Mail/smtpmx.php has content before opening <?php tag

Swapped <?PHP to <?php and error went away

Also, questions why scap seemingly allowed it, but sync-dir didn't? T124171 for that one

Event Timeline

Reedy created this task.Jan 20 2016, 2:24 PM
Reedy updated the task description. (Show Details)
Reedy raised the priority of this task from to Needs Triage.
Reedy added a subscriber: Reedy.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptJan 20 2016, 2:24 PM

Change 265273 had a related patch set uploaded (by Reedy):
<?PHP -> <?php due to scap bug

https://gerrit.wikimedia.org/r/265273

Reedy updated the task description. (Show Details)Jan 20 2016, 2:30 PM

Change 265273 merged by jenkins-bot:
<?PHP -> <?php due to scap bug

https://gerrit.wikimedia.org/r/265273

Change 265274 had a related patch set uploaded (by Reedy):
<?PHP -> <?php due to scap bug

https://gerrit.wikimedia.org/r/265274

Change 265274 merged by jenkins-bot:
<?PHP -> <?php due to scap bug

https://gerrit.wikimedia.org/r/265274

Reedy closed this task as Resolved.Jan 20 2016, 5:40 PM
Reedy claimed this task.

This is resolved by the patch above being merged.

Still the discrepancy to look at in T124171