Page MenuHomePhabricator

Fatal error: Call to a member function bind() on a non-object in UploadBase.php
Closed, ResolvedPublic

Description

Fatal error: Call to a member function bind() on a non-object in /usr/local/apache/common-local/php-1.20wmf11/includes/upload/UploadBase.php on line 247

UploadBase:
$tmpFile = $repo->getLocalCopy( $srcPath );
$tmpFile->bind( $this ); // keep alive with $thumb

File Repo:

  • @return TempFSFile|null Returns null on failure
	 */

public function getLocalCopy( $virtualUrl ) {

		$path = $this->resolveToStoragePath( $virtualUrl );
		return $this->backend->getLocalCopy( array( 'src' => $path ) );

}

FileBackend

  • @return TempFSFile|null Returns null on failure
	 */

abstract public function getLocalCopy( array $params );

Something should be checking for null in UploadBase ;)


Version: unspecified
Severity: normal

Details

Reference
bz40166

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:47 AM
bzimport set Reference to bz40166.
bzimport added a subscriber: Unknown Object (MLST).

(adding more PHP-characteristics to the title, looked a bit javascripty)

[23-Oct-2012 15:14:20] Fatal error: Call to a member function bind() on a non-object at /usr/local/apache/common-local/php-1.21wmf2/includes/upload/UploadBase.php on line 247
Server: srv295
Method: POST
URL: http://commons.wikimedia.org/w/api.php
Backtrace:
#0 /usr/local/apache/common-local/php-1.21wmf2/includes/upload/UploadBase.php(247): UploadBase::getRealPath()
#1 /usr/local/apache/common-local/php-1.21wmf2/includes/upload/UploadFromStash.php(101): UploadBase->getRealPath('mwrepo://local/...')
#2 /usr/local/apache/common-local/php-1.21wmf2/includes/api/ApiUpload.php(336): UploadFromStash->initialize('10y94n6ae130.qe...', 'Himbas.2.JPG')
#3 /usr/local/apache/common-local/php-1.21wmf2/includes/api/ApiUpload.php(64): ApiUpload->selectUploadModule()
#4 /usr/local/apache/common-local/php-1.21wmf2/includes/api/ApiMain.php(820): ApiUpload->execute()
#5 /usr/local/apache/common-local/php-1.21wmf2/includes/api/ApiMain.php(372): ApiMain->executeAction()
#6 /usr/local/apache/common-local/php-1.21wmf2/includes/api/ApiMain.php(349): ApiMain->executeActionWithErrorHandling()
#7 /usr/local/apache/common-local/php-1.21wmf2/api.php(77): ApiMain->execute()
#8 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#9 {main}

[04-Nov-2013 23:57:27] Fatal error: Call to a member function bind() on a non-object at /usr/local/apache/common-local/php-1.23wmf2/includes/upload/UploadBase.php on line 262
Server: mw1208
Method: POST
URL: http://commons.wikimedia.org/w/api.php
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf2/includes/upload/UploadBase.php(262): UploadBase::getRealPath()
#1 /usr/local/apache/common-local/php-1.23wmf2/includes/upload/UploadFromStash.php(101): UploadBase->getRealPath('mwrepo://local/...')
#2 /usr/local/apache/common-local/php-1.23wmf2/includes/api/ApiUpload.php(396): UploadFromStash->initialize('11uctuuhtfl0.o9...', '003_Acatl??n_de...', true)
#3 /usr/local/apache/common-local/php-1.23wmf2/includes/api/ApiUpload.php(65): ApiUpload->selectUploadModule()
#4 /usr/local/apache/common-local/php-1.23wmf2/includes/api/ApiMain.php(829): ApiUpload->execute()
#5 /usr/local/apache/common-local/php-1.23wmf2/includes/api/ApiMain.php(380): ApiMain->executeAction()
#6 /usr/local/apache/common-local/php-1.23wmf2/includes/api/ApiMain.php(351): ApiMain->executeActionWithErrorHandling()
#7 /usr/local/apache/common-local/php-1.23wmf2/api.php(73): ApiMain->execute()
#8 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#9 {main}

Change 96640 had a related patch set uploaded by Aaron Schulz:
Fixed fatal error when getLocalCopy() fails

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

Change 96640 merged by jenkins-bot:
Fixed fatal error when getLocalCopy() fails

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

Change 107040 had a related patch set uploaded by MarkAHershberger:
Fixed fatal error when getLocalCopy() fails

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

Change 107040 merged by jenkins-bot:
Fixed fatal error when getLocalCopy() fails

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

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:25 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:22 AM