-2

I am getting the following error.

PHP Notice: Only variables should be assigned by reference in /var/www/html/plugins/system/jxtcadminlock/jxtcadminlock.php

I am usig PHP 7.2

And the 39th line of the file(/var/www/html/plugins/system/jxtcadminlock/jxtcadminlock.php) is as below.

$mainframe =& JFactory::getApplication('admin');

I need to fix this without upgrading joomla.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • 2
    1. You should not be using J2.5 anymore. 2. You should post your Joomla questions on [joomla.se] Stack Exchange. I would request the migration of this page to Joomla, but this question is very incomplete and the users there would only tell you to upgrade your Joomla version. – mickmackusa Jul 01 '20 at 11:06

1 Answers1

1

First of all, this is just a notice. If you aren't going to fix your codebase manually to make it PHP/7 compliant you can just ignore it.

If I'm not wrong that's the old PHP/4 syntax, obsoleted in 2004, to deal with the fact that objects used to be passed by value rather than reference. It's quickly mentioned in the Migrating from PHP 4 to PHP 5.0.x guide.

Since PHP/5 you can drop the & sign altogether. However, it's very likely that this isn't the only compatibility issue.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360