Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Import: "Only variables should be passed by reference" #566

Closed
ocean90 opened this issue Oct 2, 2016 · 2 comments
Closed

Project Import: "Only variables should be passed by reference" #566

ocean90 opened this issue Oct 2, 2016 · 2 comments
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature is broken.
Milestone

Comments

@ocean90
Copy link
Member

ocean90 commented Oct 2, 2016

The PHP notice occurs when a user has only one option for the import status:

Strict standards: Only variables should be passed by reference in /wp-content/plugins/glotpress/gp-templates/project-import.php on line 47
Call Stack
#   Time    Memory  Function    Location
1   0.0001  246480  {main}( )   .../index.php:0
2   0.0002  252216  require( '/wp-blog-header.php' )    .../index.php:26
3   0.2525  5755824 require_once( '/wp-includes/template-loader.php' )  .../wp-blog-header.php:19
4   0.2525  5755872 do_action( )    .../template-loader.php:12
5   0.2525  5756544 WP_Hook->do_action( )   .../plugin.php:453
6   0.2525  5756640 WP_Hook->apply_filters( )   .../class-wp-hook.php:323
7   0.2744  5975480 call_user_func_array:{/wp-includes/class-wp-hook.php:298} ( )   .../class-wp-hook.php:298
8   0.2744  5975888 gp_run_route( ) .../class-wp-hook.php:298
9   0.2750  5976968 GP_Router->route( ) .../rewrite.php:81
10  0.2774  5991808 call_user_func_array:{/wp-content/plugins/glotpress/gp-includes/router.php:207} ( ) .../router.php:207
11  0.2774  5992080 GP_Route_Translation->import_translations_get( )    .../router.php:207
12  2.1513  74425576    GP_Route->tmpl( )   .../translation.php:40
13  2.1513  74426128    gp_tmpl_load( ) .../route.php:314
14  2.1523  74437488    include( '/wp-content/plugins/glotpress/gp-templates/project-import.php' )  .../template.php:37

Source: https://github.com/GlotPress/GlotPress-WP/blob/2.2.0/gp-templates/project-import.php#L46-L47
Test in different PHP versions: https://3v4l.org/FAgva

@ocean90 ocean90 added the [Type] Bug An existing feature is broken. label Oct 2, 2016
@ocean90 ocean90 added this to the 2.3 milestone Oct 2, 2016
@ocean90
Copy link
Member Author

ocean90 commented Oct 11, 2016

@akirk Can you take a look at this?

akirk added a commit to akirk/GlotPress that referenced this issue Oct 11, 2016
@akirk
Copy link
Member

akirk commented Oct 11, 2016

Should be fixed with this PR.

@ocean90 ocean90 added the [Status] In Progress Tracking issues with work in progress label Oct 11, 2016
ocean90 pushed a commit that referenced this issue Nov 11, 2016
@ocean90 ocean90 modified the milestones: 2.2.1, 2.3 Nov 11, 2016
akirk added a commit to akirk/GlotPress that referenced this issue Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature is broken.
Projects
None yet
Development

No branches or pull requests

2 participants