Thread:Project:Support desk/Cannot upload files since the update from 1.22.7 to 1.23./reply (49)

Hi I found the code causing the error this is the code in 1.23 causing error

foreach ( $performOpsBatch as $i => $fileOp ) { if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck $subStatus = $fileOp->attemptAsync; if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { $opHandles[$i] = $subStatus->value; // deferred } else { $statuses[$i] = $subStatus; // done already }				}			}			// Try to do all the operations concurrently... $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles ); // Marshall and merge all the responses (blocking)... foreach ( $performOpsBatch as $i => $fileOp ) { if ( !isset( $status->success[$i] ) ) { // didn't already fail in precheck $subStatus = $statuses[$i]; $status->merge( $subStatus ); if ( $subStatus->isOK ) { $status->success[$i] = true; ++$status->successCount; } else { $status->success[$i] = false; ++$status->failCount; $aborted = true; // set abort flag; we can't continue }				}			}		}	} }

and this is the code for 1.22 that works correctly

foreach ( $performOpsBatch as $i => $fileOp ) { if ( !$fileOp->failed ) { // failed => already has Status // If the batch is just one operation, it's faster to avoid // pipelining as that can involve creating new TCP connections. $subStatus = ( count( $performOpsBatch ) > 1 ) ? $fileOp->attemptAsync : $fileOp->attempt; if ( $subStatus->value instanceof FileBackendStoreOpHandle ) { $opHandles[$i] = $subStatus->value; // deferred } else { $statuses[$i] = $subStatus; // done already }				}			}			// Try to do all the operations concurrently... $statuses = $statuses + $backend->executeOpHandlesInternal( $opHandles ); // Marshall and merge all the responses (blocking)... foreach ( $performOpsBatch as $i => $fileOp ) { if ( !$fileOp->failed ) { // failed => already has Status $subStatus = $statuses[$i]; $status->merge( $subStatus ); if ( $subStatus->isOK ) { $status->success[$i] = true; ++$status->successCount; } else { $status->success[$i] = false; ++$status->failCount; $aborted = true; // set abort flag; we can't continue }				}			}		}		return $status; } }