Skip to content

Test xml + php#11

Open
arianakataokatesting wants to merge 1 commit intomainfrom
tests/google-core-topic
Open

Test xml + php#11
arianakataokatesting wants to merge 1 commit intomainfrom
tests/google-core-topic

Conversation

@arianakataokatesting
Copy link
Collaborator

No description provided.

@ariskataoka
Copy link
Owner

PHP Syntax Errors Found

Scan performed on the code at commit 2a8933a (view code).


Error: syntax error, unexpected ``linter will catch this fatal;` (T_ENCAPSED_AND_WHITESPACE)

https://github.com/ariskataoka/vipgoci-tests/blob/2a8933a4cb06a5e02326104a641bce7efebcd43c/tests1/myfile1.php#L16

Copy link
Owner

@ariskataoka ariskataoka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phpcs scanning turned up:

🚫 2 errors

⚠️ 5 warnings


hashes-api-scanning skipped

<?php
require_once __DIR__ . '/google/google-functions.php';

$pub_date = date("c", strtotime( $pub_date ) );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: date() is affected by runtime timezone changes which can cause date/time to be incorrectly displayed. Use gmdate() instead (WordPress.DateTime.RestrictedFunctions.date_date).

require_once __DIR__ . '/google/google-functions.php';

$pub_date = date("c", strtotime( $pub_date ) );
$last_build_date = date("c", strtotime( $last_build_date ) );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 Error: date() is affected by runtime timezone changes which can cause date/time to be incorrectly displayed. Use gmdate() instead (WordPress.DateTime.RestrictedFunctions.date_date).


$pub_date = date("c", strtotime( $pub_date ) );
$last_build_date = date("c", strtotime( $last_build_date ) );
?><?xml version="1.0" encoding="utf-8"?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Possible use of short open tags detected; found: <?xml version="1.0" encoding="utf-8"?>\n (Generic.PHP.DisallowShortOpenTag.PossibleFound).

<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:g="http://schemas.google.com/pcn/2020">
<title><?php echo esc_html( $site_name ); ?></title>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Variable $site_name is undefined (VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable).

xmlns:media="http://search.yahoo.com/mrss/"
xmlns:g="http://schemas.google.com/pcn/2020">
<title><?php echo esc_html( $site_name ); ?></title>
<link rel="self" href="<?php echo esc_url( $feed_url ); ?>"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Variable $feed_url is undefined (VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable).

xmlns:g="http://schemas.google.com/pcn/2020">
<title><?php echo esc_html( $site_name ); ?></title>
<link rel="self" href="<?php echo esc_url( $feed_url ); ?>"/>
<?php content_feed_render_single_panel( $post_ids, $feed_title ); ?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Variable $post_ids is undefined (VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable).

xmlns:g="http://schemas.google.com/pcn/2020">
<title><?php echo esc_html( $site_name ); ?></title>
<link rel="self" href="<?php echo esc_url( $feed_url ); ?>"/>
<?php content_feed_render_single_panel( $post_ids, $feed_title ); ?>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Warning: Variable $feed_title is undefined (VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants