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

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

Projects

None yet

2 participants

@ocean90
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 bug label Oct 2, 2016
@ocean90 ocean90 added this to the 2.3 milestone Oct 2, 2016
@akirk akirk was assigned by ocean90 Oct 11, 2016
@ocean90
Member
ocean90 commented Oct 11, 2016

@akirk Can you take a look at this?

@akirk akirk added a commit to akirk/GlotPress that referenced this issue Oct 11, 2016
@akirk akirk Fixes #566: Reference warning e394d05
@akirk
Contributor
akirk commented Oct 11, 2016

Should be fixed with this PR.

@ocean90 ocean90 added the has PR label Oct 11, 2016
@ocean90 ocean90 closed this in #577 Oct 18, 2016
@ocean90 ocean90 added a commit that referenced this issue Nov 11, 2016
@akirk @ocean90 akirk + ocean90 Fixes #566: Reference warning 11a5568
@ocean90 ocean90 modified the milestone: 2.2.1, 2.3 Nov 11, 2016
@akirk akirk added a commit to akirk/GlotPress that referenced this issue Nov 18, 2016
@akirk akirk Fixes #566: Reference warning c922026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment