Can anyone help me figure out the issue with this function in the code?
function getVerifiedProposals(uint index) public returns (string[] memory, string[][] memory, address, uint[] memory) {
string[][] storage tempDocuments;
address tempAddresses;
uint[] memory tempAmount;
if (allBidderProposals[index].status == ProposalStatus.verified) {
tempDocuments.push(allBidderProposals[index].constraintDocuments);
tempAddresses = allBidderProposals[index].bidderAddress;
tempAmount = allBidderProposals[index].quotationAmount;
}
return (constraints, tempDocuments, tempAddresses, tempAmount);
}
The error message shows :
Error: This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.